Welcome to WebmasterWorld Guest from 23.23.46.20

Forum Moderators: incrediBILL

Best way to do a really long form?

   
4:09 am on Oct 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have to build a long form in a portlet application. It's really long, about 80 fields... it fills 6 sheets of A4 when printed. What is the best way to lay it out? Can I avoid splitting it into multiple screens (which would be a coding nightmare)? Any ideas welcomed!
4:57 am on Oct 23, 2006 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Well, the non-Javascript version leaves you with long pages or multiple pages. If you can build it dynamically instead of static, splitting it is not really a coding nightmare:

foreach $v (keys %qs) {
unless (($v eq 'stepname') or ($v eq 'anything_else_you_dont_need_to_save')) {
$form .= qq¦<input type="hidden" name="$v" value="$qs{$v}">\n¦;
}
}

A PHP solution would be as easy. This allows you to keep track of each page's data through each step until the final page and doesn't require database interaction. Old-school long forms. :-) Of course, each step in the form needs to be dynamically generated.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month