Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How can I read the initial value for the radio button

Avatar

Level 1

I'd like to control the initial pages for my designed form, which controlled by the radio button.  I've write the script by using (if) rules but once the form saved the environment will resume normal.  How can I handle it?

2 Replies

Avatar

Former Community Member

Hi,

radio_btn_field.rawValue will give the value of Radio Button as true(1)/false(0).

Is this what you are looking for ?

Regards--

Chalukya.

Avatar

Level 1

May be I copy my script below

form1.body1[0].Originator.Pageselect.#field[0]::mouseUp - (FormCalc, client)
if ($.rawValue == 1) then
form1.body1[0].presence    = "visible"
form1.body1[1].presence    = "hidden"
form1.body1[2].presence    = "hidden"
form1.body1[3].presence    = "hidden"
form1.body1[4].presence    = "hidden"
form1.body1[5].presence    = "hidden"
else
form1.body1[0].presence    = "visible"
endif


form1.body1[0].Originator.Pageselect.#field[1]::mouseUp - (FormCalc, client)
if ($.rawValue == 2) then
form1.body1[0].presence    = "visible"
form1.body1[1].presence    = "visible"
form1.body1[2].presence    = "hidden"
form1.body1[3].presence    = "hidden"
form1.body1[4].presence    = "hidden"
form1.body1[5].presence    = "hidden"
else
form1.body1[0].presence    = "visible"
form1.body1[1].presence    = "visible"
endif


There are same scentense continue, but neglected.

my problem is;  once the form returned by user.  the initial view will be turning to all "hidden" except for the 1st subform.  even the user saved with any value.