「HTML_QuickFormサンプル1」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
<pre>
<?PHP
require_once("HTML/QuickForm.php");<br>
$form = new HTML_QuickForm("contact","POST");<br>
<br>
$form->addElement("header","title","お問い合わせ");<br>
$form->addElement("text","last_name","苗字:");<br>
$form->addElement("text","first_name","名前:");<br>
$sex = array();<br>
$sex[] =& $form->createElement("radio","sex",NULL,"男性","male");<br>
$sex[] =& $form->createElement("radio","sex",NULL,"女性","female");<br>
$form->addGroup($sex, "sex", "性別:");<br>
$options = array("minYear"=>1970, "maxYear"=>2000, "fromat"=>"YMD");<br>
$form->addElement("date","birthday","誕生日:",$options);<br>
$form->addElement("text","mail_address","メールアドレス:");<br>
$form->addElement("textarea","body","問い合わせ内容:");<br>
$form->addElement("submit","send","送信");<br>
<br>
//空文字チェック<br>
$form->addRule("last_name","苗字の入力よろ","required",NULL,"client");<br>
$form->addRule("first_name","名前の入力よろ","required",NULL,"client");<br>
//$form->addRule(array("text1","text2","text1とtext2が一致しません","compare",NULL,"client");<br>
$form->addRule("mail_address","メールの入力よろ","required",NULL,"client");<br>
$form->addRule("body","問い合わせ内容の入力をしてく
<pre>
<?PHP
require_once("HTML/QuickForm.php");
$form = new HTML_QuickForm("contact","POST");
<br>
$form->addElement("header","title","お問い合わせ");
$form->addElement("text","last_name","苗字:");
$form->addElement("text","first_name","名前:");
$sex = array();
$sex[] =& $form->createElement("radio","sex",NULL,"男性","male");
$sex[] =& $form->createElement("radio","sex",NULL,"女性","female");
$form->addGroup($sex, "sex", "性別:");
$options = array("minYear"=>1970, "maxYear"=>2000, "fromat"=>"YMD");
$form->addElement("date","birthday","誕生日:",$options);
$form->addElement("text","mail_address","メールアドレス:");
$form->addElement("textarea","body","問い合わせ内容:");
$form->addElement("submit","send","送信");
//空文字チェック
$form->addRule("last_name","苗字の入力よろ","required",NULL,"client");
$form->addRule("first_name","名前の入力よろ","required",NULL,"client");
//$form->addRule(array("text1","text2","text1とtext2が一致しません","compare",NULL,"client");
$form->addRule("mail_address","メールの入力よろ","required",NULL,"client");
$form->addRule("body","問い合わせ内容の入力をしてく