close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Radio Buttons Not Populating

Thread began 10/11/2016 11:33 am by tn228553 | Last modified 10/12/2016 2:02 pm by Ray Borduin | 188 views | 4 replies |

tn228553

Radio Buttons Not Populating

Attached is a default userupdate.php from building out a Security Assist login page. Everything is working great EXCEPT for the radio buttons for the Accepted value. It is not bringing forward the value and marking either of the radio buttons as "checked" even though it is saved in the database?

Is there a bug in the code that was generated?

Sign in to reply to this post

Ray BorduinWebAssist

It looks like there is an issue with the code. It isn't looking at the database column for the previously selected value. Line 155 should be:

php:
<input type="radio" name="User_Update_group_4_Accepted" id="User_Update_group_4_Accepted__1" value="this" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("userupdate","User_Update_group_4_Accepted"):"".$row_SecurityAssistMSFields["Accepted"]  .""),"this"))) {echo "checked=\"checked\"";} ?> tabindex="4" title="Please enter a value.">


and line 158 should be:

php:
<input type="radio" name="User_Update_group_4_Accepted" id="User_Update_group_4_Accepted__2" value="that" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("userupdate","User_Update_group_4_Accepted"):"".$row_SecurityAssistMSFields["Accepted"]  .""),"that"))) {echo "checked=\"checked\"";} ?> tabindex="5">
Sign in to reply to this post

tn228553

Close

Looks like there were a few typos above? I updated the code until dreamweaver quit throwing an error. Here is what I have now...

Unfortunately, after I save the value it still does not populate the correct radio field. The both stay blank even though it saves to the database. It's almost like the $row_SecurityAssistMSFields["Accepted"] value is not being called/stored from the database when the page reloads?

<label class="radioSublabel_Narrow" for="User_Update_group_4_Accepted__1"> this&nbsp;
<input type="radio" name="User_Update_group_4_Accepted" id="User_Update_group_4_Accepted__1" value="this" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("userupdate","User_Update_group_4_Accepted"):"".$row_SecurityAssistMSFields["Accepted"] .""),"this"))) {echo "checked=\"checked\"";} ?> tabindex="4" title="Please enter a value.">
</label>
<label class="radioSublabel_Narrow" for="User_Update_group_4_Accepted__2"> that&nbsp;
<input type="radio" name="User_Update_group_4_Accepted" id="User_Update_group_4_Accepted__2" value="that" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("userupdate","User_Update_group_4_Accepted"):"".$row_SecurityAssistMSFields["Accepted"] .""),"that"))) {echo "checked=\"checked\"";} ?> tabindex="5">
</label>

Sign in to reply to this post

Ray BorduinWebAssist

Does the database field have the literal value "this" or "that" in it?

Sign in to reply to this post

tn228553

Fixed

duh, nope. LOL, error on my part. Thanks for the help, looks great!

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...