Dynamic Multi-Page Form
Posted: Tue Aug 04, 2009 12:36 am
I am creating a form that consists of 4 different pages, three of which contain actual input fields; one to add general details about an event, one to add links associated with the event, and one to add files associated with the event. The fourth page simply prints the information in a table so the user can review his/her information. At the top of the form on every page, there is a "progress" navigation bar, which shows what information the user needs to complete before the form can be submitted. The user at this point needs to be able to be able to click any link in the progress bar which brings him/her to the specified page where changes can be made, and thus restored. In addition to this means of navigation, at the end of each page, there is a submit button whose action is defined to direct the browser to the next page. The tricky part is this: the second and third page (files and links forms) initially display NO fields, as all entries may not need a link/file. For those which need a link/file, there is a link that calls a simple javascript function to add a fieldset to the form with the correct input fields. The current code attempts to call any links/files that have dynamically been added in order for them to be available to edit. To store all the form variables, I have used a php session to sequentially gather all the forms, however, the whole "system" glitches and information is generally lost upon the user trying to go back and edit what he/she previously entered. The code is listed below. Please let me know if you need any clarification on the problem.