close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

using checkbox to update multiple records for order processing

Thread began 2/05/2014 6:23 am by Christopher West | Last modified 2/05/2014 12:13 pm by Jason Byrnes | 2077 views | 7 replies |

Christopher WestCommunity Expert

using checkbox to update multiple records for order processing

Hi there, I have attached a page that Im trying to add a multiple record update using checkboxes, Not sure if it wont work because the checkbox is outside the form...but had to do this as i have a second form for searching and thought it would go wrong to put it inside the main update form.

So my question is, what steps do I need to take in order to get this page to work?
The functionality of the page is as follows:
1. Form for Searching the records on the page.
2. Using Repeating Table to alternate record css colour.
3. The Form to update record consists of "Ordering Processes, such as Processing, Order Dispatched, Kit Recieved, Kit Delivered and Order Complete)

Ive applied the Form for updating records outside the repeating table for alternating css colours

and in my page layout the search form is alinged to the right and the record update form is aligned to the left.

I guess I am just confused how the whole updating multiple records using checkboxes actually work.

Edit: If I were to put the table that includes the checkboxes inside the updateform then when I click the form submit button even if i just select 1 checkbox it will ignore that and update ALL records.

Please help me :)

Chris

Attached Files
order-manager.php
Sign in to reply to this post

Jason ByrnesWebAssist

see this tutorial for details on using multiple update:
http://www.webassist.com/tutorials/Create-a-multiple-record-update-form

i'm not sure what you mean about the checkbox, but if a form element is not inside of the form, it is not a part of the form submit.

are you trying to use the checkbook to determine which records get updated? it doesn't work that way, all records. an update page does not update based on what is changed, an update page should pre populate using the original data, then when it submits it adds that data back into the recordset, if you made any changes, it will include those when adding the information back to the database

Sign in to reply to this post

Christopher WestCommunity Expert

  i'm not sure what you mean about the checkbox, but if a form element is not inside of the form, it is not a part of the form submit.  



Yes thats exactly what im trying to do so that the admin selects from a select box what order process they want to change selected records to determined by which checkboxes they tick. I got a little confused what you wrote after though. Could you explain a little more or a different way please, because after you said "it doesnt work that way" you then said "all records" so that part threw me :)

All I want is a select box to popular static content (so not from database) and the wording from this select box (order in progress; order dispatched; kit recieved etc) would then be the only field updated when the admin clicks on the submit button of the form. and the only records that will be updated are the ones that the admin selects using the checkbox next to each record that is displayed on the screen.

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

multiple updatet does not allow you to select which records get updated.

it will update all records that are being displayed.

the it works is you have a form that sows multiple records.

a recordset is used to repopulate the form


when it submits the information in the form is then added back into the database.

if no changes where made, it will just add the original data back in, if a change was made though, it adds the changes back into the database.

Sign in to reply to this post

Christopher WestCommunity Expert

So from what your saying how can achieve what I explained I wanted to do? I see websites all the time allowing users to select which records to update using a checkbox. so not sure why it cannot be achieved?

In case I have explained myself in a way that makes no sense I am attaching a screenshot that hopefully illustrates what I want to code :)

So as you can see Admin selects desired option (static content) from select box) then they will tick desired checkboxes and the click the save submit button and this will update all the checkboxed records with the updated order progress.

The feedback you have given me gives me the impression that this task cannot be done??

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

I see, you trying to change only the one column, that's a hourse of a differant color.

have you looked at the multi update tutorials:
http://www.webassist.com/tutorials/Create-a-multiple-record-update-form

http://www.webassist.com/tutorials/Multiple-Updatable-Textfields---Results-Page

Sign in to reply to this post

Christopher WestCommunity Expert

Well Jason, its obviously I have a rubbish way of explaining myself ;) Well I had a quick look at some of the related tutorials earlier and had a scan through the forum. But couldn't really find anything related to my workflow. I was wondering from the earlier php file I attached to first post that you could take a look and somehow work your magic in letting me know why its not working as planned...I guess I need to add something to the checkbox code. That would make sense. but I just need a little guiding hand in what steps i need to change or add :)

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

Well, the repeat region is not inside a form. meaning that the checkboxes are not contained in a form, and there for cannot be submitted.

you need to have a form around the repeat region and a submit button to trigger the update.



this tutorial:
http://www.webassist.com/tutorials/Multiple-Updatable-Textfields---Results-Page

does match close to what you are trying to do, a multiple update form on a results page.

take a closer look at that one.

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