Skip to main content
Known Participant
Oct 7, 2021 11:36 PM UTC
Answered

Autopopulate then read only

Hi, I can name a textfield the same name on different pages. Enter text in one, exact text autopopulates.

 

I all the fields that autopopulate except the one on page 1 to become read only. Only way to change any of them is to use the field on page 1?

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Oct 8, 2021 8:41 AM UTC

You would need to give the first field a different name and use a script to copy its value to the other fields.

If the first field is called "Name1" and the others "Name" then use this code as the custom calculation script for the latter:

 

event.value = this.getField("Name1").valueAsString;

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Oct 8, 2021 8:41 AM UTC

You would need to give the first field a different name and use a script to copy its value to the other fields.

If the first field is called "Name1" and the others "Name" then use this code as the custom calculation script for the latter:

 

event.value = this.getField("Name1").valueAsString;

Translate
murrjamesAuthor
Known Participant
Oct 8, 2021 12:10 PM UTC

I greatly appreciate this, thank you.

Translate