Default Form Header and Item Template

Mar 10, 2012 at 6:42 PM

How can we customize (even in the db or code) the default form header, item, footer templates? I want to use 'table-less' (<div>) templates, rather than tables. I can't find the location of the default table templates, and appreciate your thoughts.

Coordinator
Mar 11, 2012 at 6:58 PM

intelligent,

this is all described in the documentation here. Read the sections about templating in the module settings and the form item properties.

Best wishes
Michael

Mar 12, 2012 at 6:30 AM

I've read the documentation several times, specifically that the DEFAULT template is the HTML table, and we CAN USE the tableless format if we want.
What I'm asking is how to make the table-less code BECOME THE DEFAULT, rather than having to overwrite the default HTML with the table-less code each time.

Current Default:

<tr valign="top">
   <td>[PENCIL][LABEL]></td>
   <td>[FORMITEM][VALIDATOR]></td>
   <td>[REQUIREDIMAGE]></td>
</tr>



>HOW TO MAKE THIS THE DEFAULT?
Table-less example:
[PENCIL][LABEL][FORMITEM][REQUIREDIMAGE]<br /><br />
Coordinator
Mar 12, 2012 at 12:25 PM
Edited Mar 12, 2012 at 12:30 PM

intelligent,

the default templates are hard-coded, so the only way to change them is inside the code and recompile the module. I would not suggest to do this, as everything would be overwritten with the next update.

What I can suggest is creating an "empty" or "basic" form module including the templates you want, export the module and import it from a new module, so you avoid re-typing the template whenever you create a new module.

Best wishes
Michael