This is a discussion on "Simple form elements question!" within the PHP Forum section. This forum, and the thread "Simple form elements question! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Simple form elements question!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Simple form elements question!
Say i have a multipage form and the user fills in page 1 then goes to page 2 and fill some more in.
Then say they want to go back to page 1 to change some details, so page 1 needs to still have all the form entries they made. What i would like to know is, when generating the form elements, should i do a if statement that populates the value of the element from POST array if there is any data in it otherwise the value is empty. Is that the best / right way of doing it? Any help would be really appreciated! |
|
|
|
|||
|
Re: Simple form elements question!
I think the best way to do it would be with sessions.
That way you can the data will be accessible throughout the entire form.
Then for the form...
|
|
|||
|
Re: Simple form elements question!
Is there any reason why the form has to be on several pages? Could it be on one long page, suitably divided and presented? That way the user wouldn't be making the problem that you've then got to code for.
I'm thinking more of a logical approach than a design approach. Just a thought. |
|
|||
|
Re: Simple form elements question!
Well yes it could be on one page i think.
What it does is takes some form inputs and makes some calculations from those inputs, the results of the calculations are then displayed on the next page. If the results aren't what the user wants, they can go back and change the form entries and then submit again which recalculates, if the results are what they want, they can go on and add some more info and so on and so forth. Perhaps i need to have the form on one page but fold it up into tabbed pages with some ajax. Then i need to work out how, using ajax, to do the calculations in real time, but let the user go back and forth between tabbed pages modifying and re-calculating. I don't have much experience with ajax though, not sure how i would achieve the above! |
![]() |
| Tags |
| forms populate |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| First Hello - and a simple FORM question | webhead | Introduce Yourself | 4 | Apr 7th, 2008 18:02 |
| [SOLVED] Simple form submission question | future448 | JavaScript Forum | 2 | Oct 14th, 2007 09:35 |
| Drop down form elements | 1840dsgn | Web Page Design | 3 | Sep 4th, 2007 19:09 |
| Disabling/Enabling form elements | flamin_mongrel | JavaScript Forum | 1 | Oct 18th, 2006 21:51 |
| download browser screenshots, form elements and buttons | neckcns | Graphics and 3D | 0 | Dec 23rd, 2005 16:24 |