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

Checkbox list returning only one result from Managed Relational Table

Thread began 10/25/2016 4:33 pm by tmcbinc99963 | Last modified 10/27/2016 1:41 pm by Ray Borduin | 654 views | 7 replies |

tmcbinc99963

Checkbox list returning only one result from Managed Relational Table tutorial

My update page checkbox list and corresponding labels will only show the correct item related to the product. I need it to show the other, unchecked items as well. I've added the repeat selection server behavior (per the MRT tutorial) in different ways, always with the same result. Also tried using different recordsets for the checkbox and label, but same result.

I can get it to show the full list, or the correct checked item from the list, but never both.

Sign in to reply to this post

Ray BorduinWebAssist

I don't know your database structure, so it is hard to determine what exactly needs to be updated.

I think you need to get back to the point where it shows the full list. That is what you need. Then we can work on getting the correct items selected in that list next. It is probably going to take two separate recordsets to pull off. The issue probably is that you are using one recordset for both and that is always only working for one piece or the other.

Sign in to reply to this post

tmcbinc99963

After reviewing the Manage Relational Tables tutorial, its purpose is only to show how to insert or update multiple items (like from a checkbox list), not how to have the checkboxes checked relative to each product, like I thought. Will still be using the MRT in several instances, but also need help on the checkbox issue.

My list is now showing all results. I've also added another recordset just for the checkbox, but it won't show the proper item as checked. Will either show all checked or none checked.

Sign in to reply to this post

Ray BorduinWebAssist

The manage relational table automatically creates an array to help you pre-select. So you can remove the recordset you have created for that purpose.

The array name is:
$WA_PreSelect_RelationalTable_1

and you can see it is created on lines 276-296

To use that array to do the selections you can add this code to your checkboxes:

php:
<input type="checkbox" value="<?php echo $row_prod['ProdIDType']; ?><?php echo(in_array($row_prod['ProdIDType'],$WA_PreSelect_RelationalTable_1)?"checked":""); ?>>
Sign in to reply to this post

tmcbinc99963

After updating the source code, still getting complete list, but no checks.

New file attached.

Sign in to reply to this post

Ray BorduinWebAssist

You have slanted quotes a few places that could be causing issues:

$_GET[’ID’]

should be:
$_GET['ID']

I don't know if the slanted quotes will post on the forum, but you can see them in your source code on lines 224 and 273.

If that doesn't work, could you give me FTP access and a URL to view the page? I could debug it quickly that way.

Sign in to reply to this post

tmcbinc99963

Slanted quotes have been replaced with same result.

See PM

Sign in to reply to this post

Ray BorduinWebAssist

You had your checkbox values set to the wrong recordset and column. I've updated it and it appears to work correctly now.

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