<FORM NAME="name" FLEXYOBJECT="name"> -- configures automatic form elements
Description
By default, all forms are filled in with PHP code to echo their value (using a mapping
of object to form element name.
Tag meanings
NAME="formname" - if no flexyobject tag is used, the form name used as the object name.
A form element will use the variable eg. $t->formname->elementname
FLEXYOBJECT="objectname" - overrides the name tag so you can use different
form and object names. A form element will use the variable eg. $t->formname->elementname
If you set it to "" (blank), this resulting variable will be $t->elementname
FLEXYIGNORE - marks a form so no replacements occur.
Example
Example 25-2. Using Form tags <form name="theform">
<input name="theinput">
</form>
<form name="theform2" flexyobject="theform">
<input name="theinput">
</form>
<form name="theform2" flexyobject="">
<input name="theinput">
</form>
<form name="theform2" flexyignore>
<input name="theinput" value="dummy">
</form> |
|
Example 25-3. Compiled template <FORM NAME="theform">
<INPUT NAME="theinput" VALUE="<?php echo htmlspecialchars($t->theform->theinput); ?>"><?php
if (isset($this->errors['theform.theinput'])) { echo
htmlspecialchars($this->errors['theform.theinput']); } ?>
</FORM>
<FORM NAME="theform2">
<INPUT NAME="theinput" VALUE="<?php echo htmlspecialchars($t->theform->theinput); ?>"><?php
if (isset($this->errors['theform.theinput'])) { echo
htmlspecialchars($this->errors['theform.theinput']); } ?>
</FORM>
<FORM NAME="theform2">
<INPUT NAME="theinput" VALUE="<?php echo htmlspecialchars($t->theinput); ?>"><?php
if (isset($this->errors['theinput'])) { echo htmlspecialchars($this->errors['theinput']); } ?>
</FORM>
<FORM NAME="theform2">
<INPUT NAME="theinput" value="dummy">
</FORM> |
|