I'm a bit ashamed, because the answer to my question must be really simple, but i didn't find it in the wiki or the forum.
I'm using a custom template with a forms.
I'd like to display the "widget:description" content in my template, is there something in the $elements array that could permit me to do it ?
I know i could just copy it in the template but i'm looking for a more "MVC" way to do it..
In my fields.ini file I've got :
- Code: Select all
[fieldgroup:Usage]
label="Utilisation"
template="MyCustomGroup.html"
order=2
section:order=2
[Date]
widget:label = "Date"
widget:description = "Date de saisie (au format JJ-MM-AAAA)de ce formulaire."
validators:date = true
validators:date:message = "Le champ Date doit être une date."
validators:required = true
validators:required:message = "Merci de remplir le champ Date"
widget:ifFormat="%d-%m-%Y"
order=3
group="Usage"
and in MyCustomGroup.html file :
- Code: Select all
<table class="record-view-table" width="100%">
<tr>
<th>Date : </th>
<td>{$elements.Date.html} <span class="fieldRequired" title="required" style="color: #ff0000"></td>
<td>HERE I'd like to have the description</td>
</tr>
</table>
Thanks a lot for you help !