Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Dynamically change value of RadioButton group member

Anonymous
Not applicable

Hello,

I am creating dynamic form with livecycle designer and I have a group of radio buttons "Mr.", "Mrs.", "Ms.", "Other". When "Other" button selected, text field appears after the radio buttons group, in which user should enter the "custom" salutation.

The behaviour I want to achieve is that the value user enters in the text field, will become the value of the Radio Button group and I really got lost with this task.

Does anybody know how to do it??

Thanks in Advance,

Peter.

3 Replies
Steve_L_Walker
Level 10
Level 10

In a RadioButtonList where members are untitled and items in the RadioButtonList are defined as 'Mr.' and 'Other', the following JavaScript can be attached to the exit event of the text field used to capture the new saluation.

form1.page1.subform1.resolveNode("RadioButtonList.#field[1].caption.value.#text").value = this.rawValue;

Steve

Anonymous
Not applicable

Hello Steve,

Thanks for the fast reply.

Unfortunatly It didn't do the job - my test form attached to the message contains radio button list and text field next to them. When you submit the form I want the XML <Other> to contain the text from text box.

Thanks a lot,

Peter.

Ryan_M__Jacobs
Level 2
Level 2

You might try the following on the exit event of the text field:

Supposing you had an exclgroup called RadioButtonList, and you were wishing to store the value of your text box in a field named 'other'.

RadioButtonList.other.clearItems();
RadioButtonList.other.addItem(this.rawValue, this.rawValue);
RadioButtonList.other.setItemState(0,1);

This will set the value of the radio button 'other' to be the value entered in the text field, and will then 'select' that radio button.

Good luck,

Ryan M. Jacobs

Cardinal Solutions Group

rjacobs@cardinalsolutions.com