I'm trying to execute an Add button click-event from a folder-level javascript function. The button triggers an AddInstance on a repeatable subform. I've tried every combination of syntax I can figure out and I get an error every time.
The button resides on the footer of the subform below...
The Form uses data binding, and the form names are different from the data names, is as follows...
The addbtn click event is scripted as follows:
I've tried each of these commands from the console...
- us_ids.sffoot.addbtn.execEvent("click"); -- "us_ids is not defined"
- xfa.us_ids.sffoot.addbtn.execEvent("click"); -- "xfa.us_ids has no properties"
- xfa.form.us_ids.sffoot.addbtn.execEvent("click"); -- "xfa.form.us_ids has no properties"
- xfa.resolvenode("us-ids.sffoot.addbtn").execEvent("click"); -- "xfa.resolvenode is not a function"
I would welcome some guidance on how to structure the command(s) to either trigger the button click or execute the AddInstance.
Thank you.