Form Field Object
Parameters
- identifier = string
- attributes = array()
Functions
- set_label ( $label_text, $attributes )
- set_form_field ( $html_object, $set_auto_id )
Usage
$input_field = new FormFieldObject( 'start_date' );
$input_field->set_label( 'Begin:', array("class" => "font-bold") );
$input_field->set_form_field(
new HtmlObject('input',
array(
"type" => "text",
"class" => "form-control",
"value" => "1"
)
)
);
Output
<div id="field_identifier">
<label class="font-bold">Begin:</label>
<input type="text" class="form-control" value="1"/>
</div>