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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Repeat Regions create Selection error

Thread began 2/09/2010 8:47 pm by paul386190 | Last modified 2/12/2010 6:03 pm by Eric Mittman | 892 views | 6 replies |

paul386190

Multiple Repeat Regions create Selection error

Hi there
I'm new to WA products so please bear with me. I have an admin page created in Dreamweaver CS4 in which I'm using DataAssist Repeat Selections.

One part of the page is a submission form which contains a repeat selection comprising of a standard form drop down menu (named 'driver_id') which is dynamically populated and a couple of text entry fields. I've then applied an Insert Multiple Records behaviour to this repeat selection (creating 6 versions of this selection) and it all works beautifully.

The problem occurs when I add a second repeat selection elsewhere on the page to display a dynamically populated list. For some reason, when I do this, the first of the dynamically populated drop down menus in the form mentioned above loses its content. The other five duplicates of the drop down are populated fine, but the first one is empty.

I've looked through the forum and found something fairly similar which mentioned displaying a hidden field like...
<input type="hidden" name="driver_id_hidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />... directly after the field which is the problem, but in the same cell,
and then replacing "driver_id" in the WA_loopedFields with "driver_id_hidden". I tried this, but unfortunately it didn't resolve the issue.

I would be grateful for any assistance.
Kind regards
Paul

Sign in to reply to this post

paul386190

UPDATED: Multiple Repeat Regions create Selection error

UPDATE:

Hi again, I've almost resolved this but have one final problem. To make it easier I'll explain here just the new situation...
I have a Repeat Selection which contains a dynamically populated drop down menu and a couple of text entry fields. The repeating is set to six so in essence I have 6 copies of the drop down menu. The problem I have is that only the first version of the drop down menu displays all of the correct dynamically populated values (1-5). The other five duplicates list all apart from the FIRST dynamic value (displaying 2-5).
I would be grateful for any assistance with this?

Kind regards
Paul

Sign in to reply to this post

Eric Mittman

You say that:

The other five duplicates list all apart from the FIRST dynamic value (displaying 2-5).

So you are getting the same listing in each of the other select lists? Are these repeat selections based off of the same recordset? Please post back with this info and also include a copy of the page in question so that we can take a look at it.

Sign in to reply to this post

paul386190

Hi Eric, thank you for getting back to me.

Please find attached a copy of the file. Essentially, all 6 copies of the drop down run from the same recordset as I only hand coded one and set a repeat selection around it. The area in question is towards the bottom of the page headed 'Submit Driver Results'.

Many thanks in advance.
Paul

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

Eric Mittman

Thanks for the info and the page. I can see what is happening, the problem is that the repeat selection makes use of the mysql_fetch_assoc after each iteration. By the time it gets to this code the recordset has already been updated to point at the first record. When this code is executed the recordset pointer is updated again to point to the next record.

To resolve this problem you will need to find the fetch assoc call for the repeat selection and comment it out or delete it. This should be on line 414 of the file you posted:

php:
//$row_driversresults = mysql_fetch_assoc($driversresults);



This should get it working correctly for you. This is only a problem because you are using the same recordset to populate the list and set the repeat selection. If they were different you would not have this problem.

Sign in to reply to this post

paul386190

Hi Eric

That's worked perfectly, many thanks for the assistance.

Kind regards
Paul

Sign in to reply to this post

Eric Mittman

Glad to hear it, thanks for posting back to let us know it worked.

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