Re[2]: [SMARTY] input type text

From: Date: Sat, 22 Mar 2003 22:30:16 +0000
Subject: Re[2]: [SMARTY] input type text
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8835@lists.php.net to get a copy of this message
Hello Paul, Thanks ;)) Elgi Le samedi 22 mars 2003 à 23:20:58, vous écriviez : PL> Elgi wrote: >> Hello smarty-general, >> >> I search a plugin for input type text >> Don't exist ? >> And if no, what do you do ? >> PL> I use this one right here that I made: >> /* >> * Smarty plugin >> * ------------------------------------------------------------- >> * Function: html_input >> * Purpose: inserts an text field on the html page >> * ------------------------------------------------------------- >> */ >> function smarty_function_html_input($params, &$smarty) { >> extract($params); >> >> if (!isset($name) || empty($name)) { >> $smarty->trigger_error("assign: missing 'name' >> parameter"); >> return; >> } >> >> $html_result = ""; >> >> $html_result = "<INPUT TYPE="; >> if ($password == true) { >> $html_result .= "PASSWORD"; >> } else { >> $html_result .= "TEXT"; >> } >> if (isset($size)) { >> $html_result .= " SIZE=$size"; >> } >> if (isset($length)) { >> $html_result .= " MAXLENGTH=$length"; >> } >> >> if (isset($value)) { >> $html_result .= " >> VALUE=\"".htmlspecialchars($value)."\""; >> } else { >> $html_result .= " VALUE=\"\""; >> } >> $html_result .= " NAME=\"$name\">"; >> >> return $html_result; >> } PL> -- PL> Paul Lockaby PL> paul@paullockaby.com PL> http://www.paullockaby.com

« previous php.smarty.general (#8835) next »