close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Radio Button Syntax with SecurityAssist

Thread began 1/11/2010 7:09 am by suarezm129397438 | Last modified 1/14/2010 3:43 pm by suarezm129397438 | 2169 views | 6 replies |

suarezm129397438

Radio Button Syntax with SecurityAssist

I need some help with radio button syntax. I have a form that has radio buttons to specify shirt size. Where in the code do I enter the values of S M L XL and XXL? Here is the code that I have:

<tr>
<th>Shirt Size:</th>
<td>
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" /> S
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" /> M
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" /> L
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" /> XL
</td>
</tr>

Thank you for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

The value should be added to the value attribute:


<tr>
<th>Shirt Size:</th>
<td>
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="S" /> S
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="M" /> M
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="L" /> L
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="XL" /> XL
</td>
</tr>

Sign in to reply to this post

suarezm129397438

Thanks for this info as it kinda worked.
I updated the radio button info as you suggested and now when I use the form it does write to the database. However when I go back and look at the record from the participant_data_Prifile page, all of the data repopulates on the screen except for the info that I checked in the radio buttons. The following is how I made the updates:

<th>Shirt Size:</th>
<td><input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"S": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" />
[ Small ]
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"M": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" />
[ Medium ]
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"L": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" />
[ Large ]
<input type="radio" name="shirtsize_1" id="shirtsize_1" value="<%=String(WAATKparticipantdata.Fields.Item("shirtsize_1").Value==null?"XL": (WAATKparticipantdata.Fields.Item("shirtsize_1").Value)).replace(/"/g, '&quot;')%>" />
[ XLarge ]</td>
Did I not do this correctly?

Sign in to reply to this post

Jason ByrnesWebAssist

No, you should not be using the recordset values in the value for the radio buttons.



For each radio button, click the dynamic button in the property inspector, make sure the correct radio button is selected in the drop down list, then click the lightning bolt next to select value equal to and select the shirtsize_1 column fro the recordset.

Sign in to reply to this post

suarezm129397438

I'm still not getting it right. I think I'm missing something as I don't know where on the property inspector do I tell it that the value for the first radio button is "S", the value for the second radio button is "M", the value for the third radio button is "L"...?

Sign in to reply to this post

Jason ByrnesWebAssist

You set the value in the Checked Value field of the property inspector.

Sign in to reply to this post

suarezm129397438

OK, that ended up being way too easy. All of the extra code that SecurityAssist created threw me off track. Thank you very much.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...