本文整理汇总了PHP中FormBuilder::input方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::input方法的具体用法?PHP FormBuilder::input怎么用?PHP FormBuilder::input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::input方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Book
<?php
// =====================
// = Valid NORM Object =
// =====================
$book = new Book();
$book = $book->find(1);
$form = new FormBuilder(array('model' => $book, 'action' => 'edit', 'method' => 'post'));
echo $form->input(array('for' => 'title'));
echo $form->input(array('for' => 'author_id'));
echo $form->input(array('for' => 'price'));
echo $form->input(array('for' => 'quantity'));
echo $form->end();
unset($book);
unset($form);
示例2: FormBuilder
</h2>
<?php
echo BasicCms::block('contact');
?>
</div>
<div class="banners">
<div class="contact">
<?php
$form = new FormBuilder(array('model' => 'contact', 'action' => './inc/functions.php?f=contact', 'method' => 'post'));
?>
<?php
echo $form->input(array('name' => 'name', 'label' => '* Name', 'classes' => array('required'), 'options' => 'style="width: 200px"'));
?>
<?php
echo $form->input(array('name' => 'email', 'label' => '* Email Address', 'classes' => array('required'), 'options' => 'style="width: 250px"'));
?>
<?php
echo $form->input(array('name' => 'company', 'label' => 'Company/Website', 'options' => 'style="width: 250px"'));
?>
<?php
echo $form->input(array('name' => 'phone'));
?>
<?php
echo $form->input(array('name' => 'subject', 'options' => 'style="width: 350px"'));
?>
<?php
echo $form->textarea(array('name' => 'message', 'label' => '* Message', 'classes' => array('required'), 'options' => 'cols="50" rows="5" style="width: 520px;"'));
示例3: FormBuilder
?>
</h2>
<?php
echo BasicCms::block('quote');
?>
</div>
<div class="banners">
<div id="quote" style="margin-bottom: 100px">
<?php
$form = new FormBuilder(array('model' => 'quote', 'action' => './inc/functions.php?f=quote', 'method' => 'post'));
?>
<?php
echo $form->input(array('name' => 'name', 'label' => '* Name', 'classes' => array('required')));
?>
<?php
echo $form->input(array('name' => 'company', 'label' => '* Company', 'classes' => array('required')));
?>
<?php
echo $form->input(array('name' => 'field1', 'label' => 'Field 1'));
?>
<?php
echo $form->input(array('name' => 'field2', 'label' => 'Field 2'));
?>
<?php
echo $form->input(array('name' => 'field3', 'label' => 'Field 3'));
?>
<?php
echo $form->input(array('name' => 'field4', 'label' => 'Field 4'));