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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Radio Group not returning checked value in repeating table

Thread began 6/04/2015 12:43 am by Paul | Last modified 6/08/2015 3:47 pm by Ray Borduin | 480 views | 2 replies |

PaulBeta Tester

Radio Group not returning checked value in repeating table

Tweak required for following to return the selected option button when page is refreshed - it currently returns nothing!

<input <?php if (!(strcmp($row_rsGetUser['PicImagePrime'],$row_rsGetUser['PicID']))) {echo "checked=\"checked\"";} ?> type="radio" id="UsrImgPrime_<?php echo $row_rsGetUser['PicID']; ?>" name="UsrImgPrime" value="<?php echo $row_rsGetUser['PicID']; ?>">

Where rsGetUser is two joined tables.

Any ideas anyone?

Sign in to reply to this post

Ray BorduinWebAssist

This code attempts to select the checkbox on the row where the value for 'PicImagePrime' is equal to the value of ''PicID'

So if it isn't working, that could mean that either that value isn't set correctly in the database for the PicImagePrime field, or that the Recordset values aren't correct.

I'd probably start debugging by writing the values before the radio buttons like:

<?php echo($row_rsGetUser['PicImagePrime']); ?>:<?php echo($row_rsGetUser['PicID']); ?>

then see if there is a row in which they do match. It would appear that there isn't. Then you need to figure out why or more specifically what value instead of <?php echo($row_rsGetUser['PicImagePrime']); ?> would match <?php echo($row_rsGetUser['PicID']); ?> on the radio that should be selected.

Without context and an understanding of the rest of the page it is impossible for me to suggest the solution, but hopefully this insight will help you to debug it on your own.

Sign in to reply to this post

PaulBeta Tester

Thanks for the steer ray.

Turns out my recordset rsGetUser had two identical entries, one form each table i joined. Obviously this was caussing some conflict.
After removing one, ive now got my radio button populating as expected.

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