German German English English

 Help users <<    ^ MPForm Help pages ^    >> Private Functions 

 

MPForm Documentation: Table or not?

Level of difficulty: B 

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

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

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!