PDA

View Full Version : Form inside a repeat region, one submit button


bucanero
08-27-2009, 09:39 AM
I have a form that is inside a repeat region behaviour. Thus, when i view the page in a browser i have multiple forms that display different records.
I need to be able to make changes to all records and then use only one submit button. I've tried to put the repeated form inside a container form (nested forms) and then submit only the container but that doesn't seem to work. No matter how much i search i can't seem to find a solution to this problem.

Anyone has done it before?

edbr
08-27-2009, 10:23 AM
why do you need multiple forms, you cant nest forms so can you not just have forms with more fields in it?

bucanero
08-27-2009, 10:40 AM
can't do that... the page reads records from a database so it displays each record in a different form through repeat region behaviour

edbr
08-27-2009, 10:49 AM
so have them echo out into different fields. i cant see why you need to have multiple forms

edbr
08-27-2009, 10:52 AM
ah hang on i just re read your op, is this live or can you explain in a bit more detail what you want to do,

bucanero
08-27-2009, 11:23 AM
ok, in my php page i have a form with various dynamic textfields which pulls records from the database. This form is inside a repeat region behavior so that it pulls out all records and not just the first one. That results in having many forms when the records are more than one.

Now what i need is to change the values in every record and then through 1 submit button update all the records in the database, instead of having 1 submit button for every form/record.

edbr
08-28-2009, 01:22 AM
i dont think you will be able to achieve that with the dw wizard. certainly not easily.
if you repeat into a form ,thee will only be one submit for each. you cant as i said nest the forms.
i have to think about this but if you make a form add a textfield and repeat into that , you will get 1 form and a number of fields, i can see field names becoming a problem though.

bucanero
08-31-2009, 10:30 AM
ok, i found the solution at http://www.theblog.ca/update-multiple-rows-mysql

thank you