Definitely, here is the example of a function in the ‘Form’ class of our code library:
method addDateField
FormField addDateField( String $field_caption, String $name, [String $value = ''], [String $id = ''], [String $extra = ''])
The above function adds ‘Date’ field in a given form. The field will be added as text box with calendar (in datepicker form) attached. In the above code, we have made the field read-only by using the parameter “extra”.
Sample values to be passed into the parameters:
String |
$field_caption |
Caption |
String |
$name |
name |
String |
$value |
|
String |
$id |
html ID of the field |
String |
$extra |
any extra html for the field |