Your opinion to this page?
Deutsch Deutsch English English

 Help users <<    ^ CMS module: MPForm (Homepage of the module) ^    >> Private Functions 

 

MPForm Documentation: Table or not?

Level of difficulty: B 

The standard layout for a form is a table layout. Sometimes I find it more apropriate to use a layout without tables. This has, for instance, the advantage that in small browser windows no horizontal scroll bar is required. Instead, the answers slide from beside the questions to below the questions automagically. Most users feel this more ergonomically designed.

Because missing separation of code and content the modules Form and FormX do not allow to work without a table layout (at least not when you use captchas). This problem has been solved in MPForm, so now is no need to stay with tables. Just replace the code in the Layout settings with something else.

A simple example for a layout without tables could look like:

Header:
stays empty
Field Loop:
<div class="questionbox">{TITLE}{REQUIRED}:</div>
<div class="answerbox">{FIELD}<br />{HELPTXT}</div>
<div class="newline">&nbsp;</div>
Footer:
<div class="submitbox">
<input type="submit" name="submit" value="Submit Form" />
</div>

The classes above are already part of the file frontend.css.

Please remember that the place holder {HELP} only works in tables. If you use another layout, you need to use {HELPTXT} instead!