Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Radio button checked property View modes: 
User avatar
Member
Member
esolutions - 10/25/2013 10:55:20 AM
   
Radio button checked property
Hi, this is probably a stupid question but I'm using a radio button control on my form. I have two values: Yes and No. How do you set one of these to be "checked" when the page loads? i.e. <input type="radio" value="Yes" checked> Yes
<input type="radio" value="No"> No

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 10/25/2013 11:41:14 AM
   
RE:Radio button checked property
Look at this url:

http://www.echoecho.com/htmlforms10.htm

The example will show you, also you could do this through jquery if you wanted.

If you are talking about setting the value when you are creating a bizform I think all you do is set the default property. Otherwise, you can use a custom form layout and go into the source and set the inputs property to checked.

User avatar
Member
Member
esolutions - 10/25/2013 1:12:29 PM
   
RE:Radio button checked property
Hi,
Thanks for the info. I know how to set up radio buttons in html. I'm just not sure how to do it through Kentico.

I set up a form through Tools > Forms. I added a field called JointApp. I set the field caption to "Is this a joint application?". I then set the Options/SQL Query to

Yes;Yes
No;No

in the Editing control settings section. The only other option in this section is "repeat direction". There is no default property. It generated two radio buttons.

I am using a custom form layout. The field that is generated is $$input:JointApp$$. What is the syntax for setting the "No" radio button as the default?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/25/2013 1:50:48 PM
   
RE:Radio button checked property
When you're creating the new property, its the 5th field down from the top, Default value. Not only will this set the default value, it should also "check" the one when loading. Make sure you're using the value you entered in the SQL box below.

User avatar
Member
Member
esolutions - 10/28/2013 9:17:04 AM
   
RE:Radio button checked property
I tried the following:

checked No;No

and

checked value = "No"

and nadda...

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/28/2013 10:16:04 AM
   
RE:Radio button checked property
If your value list contains
no;no
yes;yes

Then your default value would simply be no.

User avatar
Member
Member
esolutions - 10/28/2013 10:31:02 AM
   
RE:Radio button checked property
Perfect! Thanks!