close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Radio Group Multiple Update

Thread began 5/10/2013 9:52 am by ed331947 | Last modified 6/04/2015 2:13 am by Ray Borduin | 1097 views | 15 replies |

ed331947

Radio Group Multiple Update

I have repeating rows, at the end of which is a radio group button for a user to select only one of those records. Once submit is clicked, the database should update all of those rows of any changes made. For example, if row 2 is 'default' and user wants to choose row 6 as 'default', the database should update those records to indicate only row 6 is now selected as 'default'.

Before I add the multiple update, the selection process works just fine. However, once I add the multiple update, when row 2 shows as 'default' and the user selects row 6 to be 'default', row 2 remains selected along with row 6. Once the submit button is pressed, all records are updated to be selected.

I have attached the file and appreciate any help you can offer.

Sign in to reply to this post

ed331947

With more experimenting, I changed the radio button section to the following:

<input type="radio" name="PublishGroup1_<?php echo $RepeatSelectionCounter_1; ?>" value="1" <?php if (!(strcmp($row_css_selected['publish'],"1"))) {echo "checked=\"checked\"";} ?> id="PublishGroup1_0_<?php echo $RepeatSelectionCounter_1; ?>" >

The buttons behave as they should, however, when clicking submit, it adds '1' to ALL the records, rather than just the one selected.

Sign in to reply to this post

Jason ByrnesWebAssist

In the multiple update behavior, try changing the data type for the publish column to checkbox 1,0

Sign in to reply to this post

ed331947

It still updates all records with '1' instead of '1' or '0'

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

ed331947

You can find the ftp info below. I really appreciate your help.

Sign in to reply to this post

Jason ByrnesWebAssist

What is the purpose behind using the multiple update for this?

Should only one of the 3 options be allowed to be published?

I'm not sure i understand why you are using the radio group and multiple update.

Sign in to reply to this post

ed331947

I want the end user to select one 'default' theme. I want them to have options of having more at the ready for holidays, etc., but they can only have one selected to be the default. Make sense?

Sign in to reply to this post

Jason ByrnesWebAssist

ok i got you.

Multiple update is not the way to do this.

instead use 2 update behaviors.

1) the first one will update all records to set the published column to 0

in the update behavior set the key column to use the published column. Set the Key Value to 1.

on the bindings tab, set the value for the published column to 0.

2) a a radio button to the page, and use a repeat region around it.

bind the value to the css_configid column of the recordset. also set the ID to use the css_configid column from the recordset along with the radio button name so that each radio button gets a unique ID.

In the second update record behavior, set the key column to the css_configid column. Bind the key value to the radio button, on the bindings panel set the value for the published column to 1.

the idea is to reset the published column to 0, then update the selected record to 1.

Sign in to reply to this post

ed331947

Thank you. I will give that a shot. As always, I appreciate your support!

Sign in to reply to this post
loading

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