Sign in to Community
Sign in to view all badges
Exception in line 7 of function top_level, script XFA:form1:Page1:DateTimeField1:initialize.
The action is to set the date to todays date when it's initialized, i've done this countless times before but it doesn't seem to work today. Does anyone know why I'm getting this error?
This is the auto generated code:
//+ GENERATED - DO NOT EDIT (ID:443BB922-B5CF-4C2E-AC98-90E109B03150 CRC:1922439632)
//+ Type: Action
//+ Result1: SetFieldValue("$Node1","totoday","")
//+ Node1: form1.Page1.DateTimeField1
//+ Condition1: DateField("$Node1","initialized","")
//+ ActionName: DateTimeField1.initialize
this.resolveNode("$").rawValue = util.printd("yyyy-mm-dd", new Date());
I also get this error when the event is set to exited:
Invalid property get operation; subform doesn't have property 'prototype'
Hmm I tried your script but it still doesn't seem to work. Other PDF's I've created since work ok with dates so I'll create the form again.
You also can type the script yourself, instead using the action generator. The result is a more compect code:
this.rawValue = this.isNull ? util.printd("yyyy-mm-dd", new Date()) : this.rawValue;