I have a script to insert the current day's date in a form. When I save the form with enhanced reader rights, it of course saves that day's date. Is there a way to add the enhanced readers rights and still have the script work to fill in the current day's date for the end user?
Thanks,
MDawn
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
you can solve this problem.
1. Wrap your date script in an if/else expression - this is a FormCalc example:
if ($.rawValue == null)then
$.rawValue = Num2Date(date(), "DD.MM.YYYY")
else
$.rawValue
endif
2. Before you Reader enable the form, clear the field. It will stay blank because of the if/else expression.
If your field it readOnly or protected, you need to use the JS console to clear the field. - this is an sample to access the "dateField1" under Form1.Page1.Subform1.
this.xfa.form.Form1.Page1.Subform1.dateField1.rawValue = null;
Views
Replies
Total Likes
Hi,
you can solve this problem.
1. Wrap your date script in an if/else expression - this is a FormCalc example:
if ($.rawValue == null)then
$.rawValue = Num2Date(date(), "DD.MM.YYYY")
else
$.rawValue
endif
2. Before you Reader enable the form, clear the field. It will stay blank because of the if/else expression.
If your field it readOnly or protected, you need to use the JS console to clear the field. - this is an sample to access the "dateField1" under Form1.Page1.Subform1.
this.xfa.form.Form1.Page1.Subform1.dateField1.rawValue = null;
Views
Replies
Total Likes
Thanks.
Margaret Dawn
630-850-1065
Views
Replies
Total Likes