Hi
I have a radio button on my form with options Yes and No. Yes saves Y to the database and No saves N to the database. As this form is re-displayed to users to amend I need to set the radio button to the value saved in the data base but I cant find a way to do it. The value (Y or N) for the field shows correctly in the debug list.
For other fields to display the value from the database you need to include the Value & Placeholder option under Advanced Settings but that is not available for a Radio Button.
Please can you tell me how to set the button value
Thanks
Robin
I have a radio button on my form with options Yes and No. Yes saves Y to the database and No saves N to the database. As this form is re-displayed to users to amend I need to set the radio button to the value saved in the data base but I cant find a way to do it. The value (Y or N) for the field shows correctly in the debug list.
For other fields to display the value from the database you need to include the Value & Placeholder option under Advanced Settings but that is not available for a Radio Button.
Please can you tell me how to set the button value
Thanks
Robin
Hi
First, you read your database table by Action/Database/Read database
Yo set a name and a model name of your action: for exemple (bu default), name=read_data_n, model= model_n. You choose First Record.
Then you create a View Element Radio and set radio button value= {var:read_data_n.model_n.field_name_Y_or_N}
First, you read your database table by Action/Database/Read database
Yo set a name and a model name of your action: for exemple (bu default), name=read_data_n, model= model_n. You choose First Record.
Then you create a View Element Radio and set radio button value= {var:read_data_n.model_n.field_name_Y_or_N}
To make this work I needed to do the following
1: Create a new Page Group which I called FormElements
2: Add a Radios option from the Fields drop down to this page
3: Define the Radio Buttons as follows:-
Now my form shows correctly.
Unfortunately this is too complicated to explain to normal users who were able to do this easily using Chronoforms 4. It is a pity that the Value and Place Holder option is not available for Radio Buttons.
Thanks to Calnem for pointing me i the correct direction to unravel this convoluted method of setting radio buttons. I expect something similar applies to check boxes.
1: Create a new Page Group which I called FormElements
2: Add a Radios option from the Fields drop down to this page
3: Define the Radio Buttons as follows:-
- Field Name: IncludeMast
- Add Option: Value: Y text Yes
- Add Option: Value: N text: No
- Under Advanced Settings add Dynamic Selections, then Add a Selection with a value of {var:Read_database.cfsd_Liftout.IncludeMast} (which is the field returned from the database
Now my form shows correctly.
Unfortunately this is too complicated to explain to normal users who were able to do this easily using Chronoforms 4. It is a pity that the Value and Place Holder option is not available for Radio Buttons.
Thanks to Calnem for pointing me i the correct direction to unravel this convoluted method of setting radio buttons. I expect something similar applies to check boxes.
You need to login to be able to post a reply.