These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Resetting radiobuttons in case of change of menu

francisvaneycken
Registered: Mar 30 2009
Posts: 37

Sorry for the strange title, but I'm searching for a solution for following problem:

Let's say I've got two menu's with each 5 radiobuttons.

Each radiobuttons opens a subform.

So I've got:

button 1 button2 button3 button4 button5

when I click on them they open a secondary menu existing of 5 buttons:

button6 button7 button8 button8 button9

Now here comes the problem:

All buttons are default none (empty)

When I use my buttons and the subforms change and I go back to another menu or subform where I made already a choise, the radiobutton still has its value (1 for on).

How can I fix it so the buttons always take back their default value?

I'm sure there must be a line of code to fix this. Please also recommend where to paste this code.

Thanks in advance!

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Use a button with following JavaScript.

if(xfa.host.messageBox("Do you really want to reset the form?\rAll data will be lost!", "Delete Form?",2,2)==4)
{
xfa.host.resetData(),
xfa.form.remerge();
}

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

francisvaneycken
Registered: Mar 30 2009
Posts: 37
Can I add this script to a radiobutton?
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
That wont makes sense.
A regular button ist perfect for this action.

I've mailed you a form, where you can find a Reset button at the bottom of page 2 which uses this script.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

francisvaneycken
Registered: Mar 30 2009
Posts: 37
Marcus,

Indeed you mailed me but forgot to attach the file...
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Oh yes,

you're right! I will send it to later again.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs