crispo@adobeforums.com wrote:
> find the scripting in desiigner one of the hardest things ive ever tried - ive been working on this on & off for the past year and have not been able to write the simplest scripts. well.. i dont really understand the language all the scripting is explained in..
>
> today i have been trying all day to reset a subform and havent been able to.
>
> the subform is called 'radiobuttons1' i have CTRL-clicked on one of the radiobuttons within the subform to maybe help you people understand what im trying to do.. and i get this:
>
> xfa.resolveNode("F.P1.radiobuttons1.question1.#field[0]")
>
> so.. how would i reset all fields in 'radiobuttons1' subform? without having to type out all fields.. pretend i have 1000 fields i want to reset and another 1000 i dont want to reset.. there must be a way to do this.
>
> xfa.host.resetData("radiobuttons1"); ??
>
> xfa.F.P1.radiobuttons1.resetData() ??
>
> xfa.host.resetData("F.P1.radiobuttons1"); ??
>
> is there anywhere with kiddy instructions such as 'click on that button that looks like this..' 'in order to do .....,type the following words in that blank space you can see at the top of your screen...etc' even the supposedly simple explanations use words i dont understand..
>
> thanks in advance hopefully - i want to die
If you want to reset only a specific subform, you have to pass in the
full SOM expression to the resetData() method. The most reliable way to
do this is to use the 'somExpression' property. So, for example,
suppose you have a "reset" button inside of your radiobuttons1 subform
that you want to reset only that subform. You could do it with the
following line of code on the click event for your button:
xfa.host.resetData(this.parent.somExpression);
This will reset only the data in the radiobuttons1 subform.
See if this helps. If not, feel free to ask question.
Justin Klei
Cardinal Solutions Group
www.cardinalsolutions.com