Example #1
0
 public function hidden_field($name, $html_attributes = array())
 {
     $value = strval($this->get_model_data($name));
     return FormTagHelper::hidden_field_tag($this->get_field_name($name), $value, $html_attributes);
 }
Example #2
0
 public function test_hidden_field_tag()
 {
     $actual = FormTagHelper::hidden_field_tag('foo', 'bar');
     $matcher = array('tag' => 'input', 'attributes' => array('type' => 'hidden', 'value' => 'bar', 'id' => 'foo', 'name' => 'foo'));
     $this->assertTag($matcher, $actual, 'Default attributes');
 }