[PHP-users 24857] (無題)

it_555_it @ excite.co.jp it_555_it @ excite.co.jp
2005年 3月 14日 (月) 13:50:00 JST


お疲れ様です。
島田と申します。

下記のソフトウェアを利用して、
フォーム画面を作っています

PHP-4.3.8
Smary2.6.7
HTML_QuickForm3.2.4pl1

OS: Windows XP, VineLinux2.4.22 ともに不可

どういうわけだか hiddenフォームだけ生成されないのですが、
対処策ご存知の方いらっしゃいますでしょうか。

■Sample1 hidden -> フォームがtemplate上で生成されず

--- test.php ---

require_once ('HTML/QuickForm.php');
require_once ('HTML/QuickForm/Renderer/ArraySmarty.php');

$form = new HTML_QuickForm('top', 'get', "test.php");
$form->addElement('hidden', 'name', 'hoge');
//$form->addElement('text', 'name'); は、問題なし。
$form->addElement('submit', 'submit', '検索');

$renderer =& new HTML_QuickForm_Renderer_ArraySmarty($this);
$form->accept($renderer);

$this->assign('top', $renderer->toArray());
$this->display('top.tpl');


--- test.tpl ---

<form {$top.attributes}>
{$top.name.html}
{$top.submit.html}
</form>

■Sample2(レンダラ未使用) -> OK

require_once ('HTML/QuickForm.php');

// Form の生成
$form = new HTML_QuickForm('top', 'get', "test.php");
$form->addElement('hidden', 'name', 'hoge');
$form->addElement('submit', 'submit', '検索');
$form->display();



PHP-users メーリングリストの案内