Below is my situation.
I have a HTML text form.In the form i have an item called as "*Beverage*" and its options in radio group or Coffee ,Tea. Now i want to set a default value("NA") to Beverages radio group.Is that doable.If so how. Any tips would be helpful.Thanks
What I have done is to define a radio group page item (:P3_BEVERAGE) with "DISPLAY EXTRA VALUES" set No and "DISPLAY NULL VALUE" set No. List of values definition is STATIC2:COFFEE;COFFEE,TEA;TEA,NA;NA
Then I have a Before Header process (SET_BEVERAGE_VALUE) to set the default value:
IF :P3_BEVERAGE IS NULL THEN
:P3_BEVERAGE := 'NA';
You can set default value to radio group also from setings item page under the default option. There you must put result value (if you have static:Coffee;A, Tea;B, NA;C you write C if you want NA for default choice) of your radio item.
The effect of using the process code to set the value versus using the default value of the page item, as I understand it, would be that the process would place the value into the session state while the default value is not placed into the session stage until after page submit. So, you have a choice of methods depending on what you want to happen.