Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

adaptive form || radio buton - default value

Avatar

Level 4

Query - How to set a default value for a radio button ?

Scenario ...

I have a radio button that has two values. It has two value no=No , yes=Yes and field name is testRadioButton

I want to use this for the basis of hiding some other field. But I need to show it at time of form load. Whet I use an expression testRadioButton.value == "yes" in the field that I need to show/hide, It works fine except that it is always hidden on form load. I found that it is hidden because the value is not set for the radio button.

Note: If I put a value no in Value field, it is used for pre-populating in edit node ONLY

Another related thing.... documentation referes to something called ... "Initialization Script" but I cant seem to find it in the actual form. What could I be missing

/KS

1 Accepted Solution

Avatar

Correct answer by
Employee
2 Replies

Avatar

Correct answer by
Employee

Hi Kanwaljit,

have you already explored https://helpx.adobe.com/aem-forms/6/help-tutorials.html 

Is this the page you saw details about the initialisation script [2]

Regards,

Opkar

[1] https://helpx.adobe.com/aem-forms/6/help-tutorials.html

[2] https://helpx.adobe.com/aem-forms/6/adaptive-form-expressions.html

Avatar

Level 4

Hey Opkar,

Thanks for the response. Yes this link [2] is where I saw the mention of initialization script. Though it is mentioned in documentation, I can't see where to put that in the actual form.

Response to a day care ticket that I raised for this that "The issue described by you has been reported to engineering already and they are already working on it. (Internal reference: CQ-47378)"

/Regards
Kanwal