Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
16

Duplicate fields but one read only

Community Beginner ,
Feb 15, 2024 Feb 15, 2024

I have a date picker named "editableDate" I want a second form field "readonly" to display what is in "editableDate" but i want to make "readonly" read only without locking "editableDate"

TOPICS
How to , PDF forms
427
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2024 Feb 15, 2024

They can't be duplicates, in that case. Name the second field "editableDate_Copy" and use the following code as its custom calculation script:

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 15, 2024 Feb 15, 2024

I tried that, but it does not pull, I am guessing it has something to do with the date picker? I tried date picker to date picker, I tried date picker to text form field. I adjust the formatting to be identical no joy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2024 Feb 15, 2024

It should work, regardless of the format. Where did you place the code? Did you check the JS Console for errors after changing the value of the first field, after applying the code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 15, 2024 Feb 15, 2024
LATEST

OMG, there were compounding form fields overlapping after deleting the entire form and starting over with the calculation you provided first it worked. Thank you and sorry for the noob mistake! 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines