Re[2]: [SMARTY] input type text
| From: | Elgi | Date: | Sat, 22 Mar 2003 22:48:31 +0000 |
| Subject: | Re[2]: [SMARTY] input type text | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8837@lists.php.net to get a copy of this message | ||
Hello Paul,
It's good thanks and i have made
{html_textaera} with your plugin ;))
I don't test in this time.
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* Function: html_textaera
* Purpose: inserts an textaera field on the html page
* -------------------------------------------------------------
*/
function smarty_function_html_textaera($params, &$smarty) {
extract($params);
if (!isset($name) || empty($name)) {
$smarty->trigger_error("assign: missing 'name' parameter");
return;
}
$html_result = "";
$html_result = "<textarea";
if (isset($rows)) {
$html_result .= " rows=$rows";
}
if (isset($cols)) {
$html_result .= " cols=$cols";
}
$html_result .= " name=\"$name\">";
if (isset($value)) {
$html_result .= htmlspecialchars($value);
}
$html_result .= "</textarea>";
return $html_result;
}
?>
Elgi
Le samedi 22 mars 2003 à 23:41:33, vous écriviez :
PL> Perhaps I should document it some:
PL> Acceptable parameters:
PL> name = the NAME html attribute (required)
PL> length = the MAXLENGTH html attribute
PL> size = the SIZE html attribute
PL> value = the default value for the field
PL> password = a boolean field for whether the textbox will be standard
PL> input or a password input
PL> --
PL> Paul Lockaby
PL> paul@paullockaby.com
PL> http://www.paullockaby.com