Skip to main content
Inspiring
June 13, 2023
Answered

How to make Field02 auto-populate with info from Field01 but with a smaller font than Field01?

  • June 13, 2023
  • 2 replies
  • 902 views

Hi!

 

I have a two-page form. Page one has Field01 (with a set font size) and page two has Field02 (with a smaller, or auto, font size).

 

Field02 needs to auto-populate with the same info entered into Field01. But Field02 needs to have the ability to either shrink-to-fit or have a smaller (or auto) font size because the space on the form for Field02 is shorter than the space for Field01.

 

Because of the need for Field02 to have a smaller-size font than Field01, I can't name the fields Field01#0 and Field01#1.

 

Is there code that I can use to make Field02 auto-populate with the info from Field01 but also Field02 either shrink-to-fit (auto-size) or be a smaller font size than Field01?

 

Thank you so much!!

Diane

This topic has been closed for replies.
Correct answer ls_rbls

Hi @dianed97898145 ,

 

You may set the Feld02 Properties to auto font size, and use a custom calculation script in Field02, for example:

 

event.value = this.getField("Field01").value;

2 replies

ls_rbls
Community Expert
ls_rblsCommunity ExpertCorrect answer
Community Expert
June 13, 2023

Hi @dianed97898145 ,

 

You may set the Feld02 Properties to auto font size, and use a custom calculation script in Field02, for example:

 

event.value = this.getField("Field01").value;
Inspiring
June 13, 2023

Thank you SO MUCH! It worked and I'm off and running. 🙂

 

Have a great day!!

Diane

ls_rbls
Community Expert
Community Expert
June 13, 2023

You're welcome.

Karl Heinz  Kremer
Community Expert
Community Expert
June 13, 2023

You can use two different fields with two different configurations (e.g. font and font size), and still copy information from field1 to field2. You do this by configuring the "calculation" rules in field2: Bring up the field properties for field2 and go to the "Calculate" tab. Select to use a custom calculation script and used the following script:

 

event.value = this.getField("field1").value;

You probalby also want to make field2 read-only. You can do this on the "General" tab. Anything entered in field1 should now show up in field2. 

Inspiring
June 13, 2023

Thank you, Karl!

 

Unfortunately, it didn't work but in looking at the code that ls_rbls I'm able to see what happened.

 

Thank you so much for your help!

Diane

Karl Heinz  Kremer
Community Expert
Community Expert
June 13, 2023

Sorry, I had a lower case "f" in the field name. This is case sensitive.