Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Tabbing inside a web form

Status
Not open for further replies.

GigaG

Technical User
Aug 28, 2007
83
US
Is there a not so difficult way to have the ability to have tabbing for a web form? I have form that users will fill out and submit like a normal form, but the form has roughly 5 sections and is about 70 or 80 questions long... (Yes they actually fill all of it out). What my manager and I were thinking would be nice, is if we could have the ability to section off each "section" of the form into a tab view.

Is this possible?? I wasn't finding much in Google

MCP ACA-I CTP
 
It is possible, however Its not as simple as you may think,. You would probably need to use session{s to keep the filled in data, while moving around the tabs.

In other words, each time you changed a tab, you would be essentially submitting the information, and storing in a session variable or even a temporary table in your DB. once everything has been filled in, then you process it.


While it is possible and its not to difficult, it will take a bit of coding in the background to get it to work.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
take a look at html quick form and its controller.
 
Jpaide,
what do you mean by quick form?? I googled HTML quick form and got quick tutorials...

MCP ACA-I CTP
 
You could simulate the tabs using CSS and javascript to show/hide tabs. That way, everything could be in a single form and you wouldn't need to store anything in a session.

It would be important to hide the tabs via javascript calls rather then by default CSS when the page loaded. This way you can be sure that if Javascript wasn't available the whole form would be shown.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
vacunita said:
You could simulate the tabs using CSS and javascript to show/hide tabs. That way, everything could be in a single form and you wouldn't need to store anything in a session.

that would work but would not allow the user to come back to the form (70 questions?) to complete over more than one session. Perhaps not a requirement, however.

@GigaG
quickForm is a pear package. as is the controller.
pear.php.net and search for HTML_QuickForm

there is a learning curve to its use, but it's shallow and the benefits of the quickform class are enormous. do not use the php5 variant yet - it's not ready. but the php4 variant works just fine in php5. i use my own renderer so as to avoid using table-based forms. but that's just preference.
 
That's true jpadie.
Perhaps a better option would be a combination?
Use Sessions to store the info for the entire form and use CSS/Javascript to create the tabs. The crux is there is a single form rather than a number of forms.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top