Exemplo n.º 1
0
 public function add_field($fname)
 {
     if (isset($this->_fields[$fname])) {
         throw new Exception("The form field \"{$fname}\" does already exist!<br />" . "The following fields are already defined:" . Kohana::debug(array_keys($this->_fields)));
     }
     $this->_fields[$fname] = Uniform_Field::factory('Generic', array('name' => $fname));
     $this->_current = $fname;
     //defaults
     $this->hname(ucfirst($fname))->suffix("<br />\n")->field_params(array());
     return $this;
 }
Exemplo n.º 2
0
 public function __construct($params)
 {
     parent::__construct($params);
 }
Exemplo n.º 3
0
<?php

defined('SYSPATH') or die('No direct script access.');
echo $form->open();
echo "<div class='uniform_form'>";
echo $form->render_fields();
echo '</div>';
if (!$form->no_submit()) {
    echo $form->submit();
} else {
    //so we can submit without submit input field and $form->sent() will still work
    echo Uniform_Field::factory('hidden', array('name' => $form->submit_name, 'value' => 1))->render();
}
echo $form->close();