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

Prevent date change when opening form again

New Here ,
Jan 06, 2025 Jan 06, 2025

When i open my form it resets to current date. 

I want people to be able to choose current date or manual date or fix the date after saving. 

I have the following code, but that doesn't seem to work as planned. When not choosing the checkbox the textfield will be empty. 

if(this.getField("chkDateSign").valueAsString != "Off")
this.getField("Dato2_af_date").value = util.printd("dd.mm.yyyy", new Date());

else
event.value = "";
TOPICS
General troubleshooting , How to , PDF forms
145
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 ,
Jan 07, 2025 Jan 07, 2025
LATEST

Replace the last line with:

this.getField("Dato2_af_date").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