Skip to main content
GrDz17
Participating Frequently
March 22, 2018
Answered

Fillable Form - Duplicate Fields & Read-Only

  • March 22, 2018
  • 1 reply
  • 3655 views

I have created a fillable form that has three tear-off vouchers. There are three input fields on each voucher.

However, I want the "parent" fields on the first voucher to be editable, and the "child" fields on the other two vouchers to be read-only.
This is to avoid any user error, including accidental tabbing, typos, or deletion.

Even if HTML or Javascript is necessary, is there a way to do this?

This topic has been closed for replies.
Correct answer try67

You can use a simple script to do it. If the first field is called Text1 enter this code as the custom calculation script of the other fields, and set them as read-only:

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

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 22, 2018

You can use a simple script to do it. If the first field is called Text1 enter this code as the custom calculation script of the other fields, and set them as read-only:

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

GrDz17
GrDz17Author
Participating Frequently
March 22, 2018

It works perfectly for the first two text fields (Address, City). Thanks a lot, try67​!

However, I'm having problems using it with the last field, a phone number.

Does it make a difference if that field's Format is Special > Phone Number?

try67
Community Expert
Community Expert
March 22, 2018

Yes, because the value that is being copied is not formatted. You should apply the same format to the target fields, and then it should work.