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

checkbox data not updating

Thread began 5/13/2010 10:18 am by info97301 | Last modified 5/26/2010 1:59 pm by Jason Byrnes | 1593 views | 11 replies |

info97301

checkbox data not updating

Hi

I created a form with DataAssist, which works fine.

I then added some fields in the database table (enum field type, 'yes' or 'no', 'no' by default)

I returned to the form and added checkboxes for the additional fields, altered the update behaviour etc etc.

However, the fields are not updated if I try to change any of them.

If I make a change direct in the database, then the changes are reflected when the page opens (i.e. certain fields will be checked), so the retrieving part of the page is working properly.

In the form, the checked value = yes :

<input <?php if (!(strcmp($row_WADAlistings['MobilityIcon'],"yes"))) {echo "checked=\"checked\"";} ?> name="ckmobility" type="checkbox" id="ckmobility" value="yes" />

In the update behaviour, the update field is set to type 'text, with the value such as the following:

<?php echo ((isset($_POST["ckmobility"]))?$_POST["ckmobility"]:""); ?>

I have even tried creating a new page just with the checkboxes on, but this doesn't work either (I note it defaults to checkbox value = '1'', do I need to change the field format in the database? Not a problem as I'm still developing at the moment)

TIA
Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page so I can examine the code in its entirety.

Sign in to reply to this post

info97301

Hi Jason

txt file attached. You will not I've started trying radio buttons in addition to checkboxxes - these don't work either!

Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

I dont see any attached file.

Please compress the php file into a zip archive and attach the zip file to your reply.

Sign in to reply to this post

info97301

Oops! Hopefully this gets there

Thanks

Chris

Attached Files
listings_Update2.zip
Sign in to reply to this post

Jason ByrnesWebAssist

try changing the no option:
<input <?php if (!(strcmp($row_WADAlistings['MobilityIcon'],"no"))) {echo "checked=\"checked\"";} ?> type="radio" name="ckmobility" id="radio2" value="no" />

value to blank:
<input <?php if (!(strcmp($row_WADAlistings['MobilityIcon'],"no"))) {echo "checked=\"checked\"";} ?> type="radio" name="ckmobility" id="radio2" value="" />




Then in the Update record server behavior, set the data type for the checkbox column to be Checkbox Yes/ No

Sign in to reply to this post

info97301

Hi Jason

No good - didn't make any difference.

However, I have tried removing the WA Update process and applied the Dreamweaver Update process and it all works fine!

Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the dream weaver update page, this may help me determine why data assist was not working.

Sign in to reply to this post

info97301

Hi Jason

File attached. You will notice I've changed them all to radio buttons!

Cheers

Chris

Attached Files
listings_Update.zip
Sign in to reply to this post

biz295654

what was the solution to this? it may be related to what I'm trying to fix...thanks

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