Esempio n. 1
0
 public function __toString()
 {
     if (strtolower($this->config['method']) == 'put' || strtolower($this->config['method']) == 'delete') {
         $method = 'POST';
         $extra = FormTagHelper::hidden_field('_method', '_method', $this->config['method']);
     } else {
         $method = $this->config['method'];
     }
     $form_options = array_merge(array('name' => strtolower($this->get_form_name()), 'method' => $method, 'action' => $this->config['path']), $this->tag_options);
     if (isset($this->config['type'])) {
         $form_options['enctype'] = $this->config['type'];
     }
     $return = TagHelper::tag('form', $form_options);
     if (isset($extra)) {
         $return = $return . $extra;
     }
     return $return;
 }
Esempio n. 2
0
 public function hidden_field($id, $name, $value, $options = array())
 {
     $id = $this->id . '_' . $id;
     $name = $this->name . '[' . $name . ']';
     return FormTagHelper::hidden_field($id, $name, $value, $options);
 }