smarty_function_select (line
29)
smarty function:セレクトフィールド生成
sample:
$smarty->assign('hoge',
array(
'1' => array('name' => 'foo'),
'2' => array('name' => 'bar')
)
);
{select list=$hoge name="hoge" value="1" empty="-- please select --"}
<select name="hoge">
<option value="">-- please select --</option>
<option value="1" selected="selected">foo</option>
<option value="2">bar</option>
</select>
void
smarty_function_select
( $params, &$smarty, array $list, string $name, string $value, string $empty)
-
array
$list: 選択肢一覧
-
string
$name: フォーム項目名
-
string
$value: セレクトボックスに渡されたフォーム値
-
string
$empty: 空エントリ(「---選択して下さい---」等)
-
$params
-
&$smarty