static string get_valid_id(
$id
)
|
|
Convert a given string (e.g. fieldname) to a valid HTML id.
Parameters:
Form Form(
[string
$form_action = NULL], [string
$form_name = ''], [string
$form_method = 'post'], [string
$layout = NULL], [string
$enctype = '']
)
|
|
Constructor
Parameters:
|
string |
$form_action: |
the action destination of the form (NULL for pagenow) |
|
string |
$form_name: |
the name of the form (will be used as an ID) |
|
string |
$form_method: |
the action to execute when the form is submitted |
|
string |
$layout: |
the method used to send data |
|
string |
$enctype: |
the form layout : 'fieldset', 'table' or '' (NULL means: if there is an $AdminUI object get it from there, otherwise use 'fieldset') |
The begin_field(
[string
$field_name = NULL], [string
$field_label = NULL], [boolean
$reset_common_params = false]
)
|
|
Start an input field.
A field is a fielset containing a label div and an input div.
Parameters:
|
string |
$field_name: |
The name of the field |
|
string |
$field_label: |
The field label |
|
boolean |
$reset_common_params: |
Reset $_common_params? This should be used if you build a field by yourself. |
API Tags:
true|string begin_fieldset(
[string
$title = ''], [string
$field_params = array()], [array
$icons = array()]
)
|
|
Builds a fieldset tag. This is a fieldset element by default, but a th element for table layout.
Parameters:
|
string |
$title: |
the title of the fieldset |
|
string |
$field_params: |
the field params to the fieldset additionally 'legend_params' can be used to give an array of field params |
|
array |
$icons: |
the icons action of the fieldset |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed begin_form(
[string
$form_class = NULL], [string
$form_title = ''], [array
$form_params = array()]
)
|
|
Builds the form field
Parameters:
|
string |
$form_class: |
the class to use for the form tag |
|
string |
$form_title: |
title to display on top of the form |
|
array |
$form_params: |
Additional params to the form element. See $_common_params. These may override class members. |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed button(
array
$options
)
|
|
Builds a button
the array must contain :
- the button type
- the name (optional)
- the value (optional)
- the class (optional)
- the onclick attribute (optional)
- the style (optional)
Parameters:
|
array |
$options: |
a two-dimension array containing the elements of the input tags |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed buttons(
[array
$buttons = array()], boolean
1
)
|
|
Builds a button list.
Array entries with numeric (deprecated) keys are converted to their equivalent string indexes.
the two-dimension array must contain :
- the button type
- the name (optional)
- the value (optional)
- the class (optional)
- the onclick attribute (optional)
- the style (optional)
Parameters:
|
boolean |
1: |
to select or not the default display |
|
array |
$buttons: |
a two-dimension array containing the elements of the input tags |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed buttons_input(
[array
$buttons = array()]
)
|
|
Builds a button list.
The array contains an associative array for each button (params to button_input().
Parameters:
|
array |
$buttons: |
a two-dimension array containing the elements of the input tags |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed button_input(
[array
$field_params = array()]
)
|
|
Builds a button.
Array entries with numeric (deprecated) keys are converted to their equivalent string indexes.
Parameters:
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - type: The type attribute (string, default 'submit')
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed checkbox(
string
$field_name, boolean
$field_checked, string
$field_label, [string
$field_note = ''], [string
$field_class = ''], [string
$field_value = 1], [boolean
$field_disabled = false]
)
|
|
Builds a checkbox field
Parameters:
|
string |
$field_name: |
the name of the checkbox |
|
boolean |
$field_checked: |
indicating if the checkbox must be checked |
|
string |
$field_label: |
label |
|
string |
$field_note: |
note |
|
string |
$field_class: |
CSS class |
|
string |
$field_value: |
value to use |
|
boolean |
$field_disabled: |
an optional indicating whether the box is disabled or not |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed checkbox_input(
string
$field_name, boolean
$field_checked, string
$field_label, [array
$field_params = array()]
)
|
|
Builds a checkbox field
Parameters:
|
string |
$field_name: |
the name of the checkbox |
|
boolean |
$field_checked: |
indicating if the checkbox must be checked by default |
|
string |
$field_label: |
label |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: 'value': the value attribute of the checkbox (default 1) |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed checklist(
array
$options, string
$field_name, string
$field_label, [boolean
$required = false], [boolean
$add_highlight_spans = false]
)
|
|
Builds a checkbox list
the two-dimension array must indicate, for each checkbox:
- the name,
- the value,
- the comment to put between <input> and
- a boolean indicating whether the box must be checked or not
- an optional boolean indicating whether the box is disabled or not
- an optional note
- 'required': is the box required to be checked (boolean; default: false)
Parameters:
|
array |
$options: |
a two-dimensional array containing the parameters of the input tag |
|
string |
$field_name: |
name |
|
string |
$field_label: |
label |
|
boolean |
$required: |
true to surround checkboxes if they are required |
|
boolean |
$add_highlight_spans: |
true add a surround_check span, used by check_all mouseover |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
Information Tags:
| Todo: | Transform to $field_params schema. |
Return links to check and uncheck all check boxes of the form
mixed combo_box(
string
$field_name, string
$field_value, string
$field_options, string
$field_label, [array
$field_params = array()]
)
|
|
Combo box Display a select options list with an option 'new', and when this one is seleted, display a combo input text to add a new value
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_value: |
field value |
|
string |
$field_options: |
containing options |
|
string |
$field_label: |
field label |
|
array |
$field_params: |
Optional params |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
array convert_button_to_field_params(
array
$options
)
|
|
Convert a deprecated, numeric button array to a field_params array.
Parameters:
|
array |
$options: |
A button array like button() and buttons() are getting. |
API Tags:
| Return: | The button array converted to a string indexed button array (field_params). |
| Deprecated: | |
mixed date(
string
$field_name, string
$field_value, string
$field_label, [string
$date_format = NULL]
)
|
|
Builds a date input field.
Parameters:
|
string |
$field_name: |
the name of the input field |
|
string |
$field_value: |
initial value (ISO datetime) |
|
string |
$field_label: |
label displayed in front of the field |
|
string |
$date_format: |
date format (php format) |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed date_input(
string
$field_name, string
$field_value, string
$field_label, [array
$field_params = array()]
)
|
|
Builds a date input field.
Parameters:
|
string |
$field_name: |
the name of the input field |
|
string |
$field_value: |
initial value (ISO datetime (YYYY-MM-DD HH:MM:SS) or erroneous if the field is in error state) |
|
string |
$field_label: |
label displayed in front of the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - date_format: Format of the date (string, PHP format, default taken from locale_datefmt())
- add_date_format_note: If true, date format note gets prepended to the field's note
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
true|string dayOfWeek(
$field_name,
$field_value,
$field_label, [
$field_note = NULL], [
$field_class = NULL]
)
|
|
Build a select to choose a weekday.
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_class: |
|
true|string dayOfWeek_input(
$field_name,
$field_value,
$field_label, [
$field_params = array()]
)
|
|
Build a select to choose a weekday.
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_label: |
|
|
|
$field_params: |
|
API Tags:
true|string display_or_return(
$r
)
|
|
Display or return, according to $output.
Parameters:
API Tags:
| Return: | True, if we want to display, the string if not. |
mixed duration(
string
$field_prefix, string
$duration, string
$field_label
)
|
|
Builds a duration input field.
Parameters:
|
string |
$field_prefix: |
the name of the input field |
|
string |
$duration: |
initial value (seconds) |
|
string |
$field_label: |
label displayed in front of the field |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed duration_input(
string
$field_prefix, string
$duration, string
$field_label, [array
$field_params = array()]
)
|
|
Builds a duration input field.
Parameters:
|
string |
$field_prefix: |
the name of the input field |
|
string |
$duration: |
initial value (seconds) |
|
string |
$field_label: |
label displayed in front of the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - minutes_step ( default = 15 );
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
Information Tags:
| Todo: | @Francois: please check API and change as appropriate. |
The end_field(
[string
$field_note = NULL], [string
$field_note_format = NULL]
)
|
|
End an input field.
A field is a fielset containing a label div and an input div.
Parameters:
|
string |
$field_note: |
Field's note to display. (deprecated) |
|
string |
$field_note_format: |
Format of the field's note (%s gets replaced with the note). (deprecated) |
API Tags:
true|string end_fieldset(
)
|
|
Ends a fieldset.
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
true|string end_form(
[array
$buttons = array()]
)
|
|
Ends the form, optionally displays buttons and closes all open fieldsets.
Parameters:
|
array |
$buttons: |
Optional array to display the buttons before the end of the form, see buttons_input() |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting. |
string get_input_element(
[array
$field_params = array()], [
$parse_common = true]
)
|
|
Generate a general input element.
Parameters:
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - input_prefix: Text before <input /> (string, default '')
- input_suffix: Text after <input /> (string, default "\n")
- input_help: Gets used as default value on empty input (type=text)
elements. It gets attached through JavaScript (onfocus, onblur and form.onsubmit).
|
|
|
$parse_common: |
|
API Tags:
Get the label of a field. This is used by begin_field() or end_field(), according to $label_to_the_left
API Tags:
void handle_common_params(
array
&$field_params, [string|NULL
$field_name = NULL], [
$field_label = NULL]
)
|
|
Extract common params out of $field_params into $_common_params and unsets them in $field_params.
Also handles adding errors from $Request to the note.
Parameters:
|
array |
&$field_params: |
An array passed to a field generating function like text_input(). By reference! |
|
string|NULL |
$field_name: |
The name of the field. If not empty it gets used to build the id attribute. |
|
|
$field_label: |
|
API Tags:
void hidden(
string
$field_name, string
$field_value
)
|
|
Builds an hidden input tag, overwriting any previous hidden values (except for "foo[]").
Parameters:
|
string |
$field_name: |
Field name |
|
string |
$field_value: |
Field value |
API Tags:
mixed hiddens(
array
$hiddens
)
|
|
Builds a list of hidden inputs.
Parameters:
|
array |
$hiddens: |
Array of parameters to hidden(): - 0: field_name
- 1: field_value
- 2: field_params
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
void hiddens_by_key(
array
$hiddens, [array|NULL
$exclude = NULL]
)
|
|
Builds a list of hidden inputs from an array where the keys are the field names.
It supports array values (one-dimensional) and generates appropriate key-value pairs.
Parameters:
|
array |
$hiddens: |
associative array ( name => value ) of hidden fields. |
|
array|NULL |
$exclude: |
A list of keys to ignore. |
API Tags:
Add the "ctrl" param, used in the backoffice, as a hidden field.
mixed info(
string
$field_label, string
$field_info, [string
$field_note = NULL], [
$format = 'htmlbody']
)
|
|
Builds an info field.
An info field is a fieldset containing a label div and an info div.
Parameters:
|
string |
$field_label: |
the field label |
|
string |
$field_info: |
the field info |
|
string |
$field_note: |
see format_to_output() |
|
|
$format: |
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed info_field(
string
$field_label, string
$field_info, [array
$field_params = array()]
)
|
|
Builds an info field.
An info field is a fieldset containing a label div and an info div.
Parameters:
|
string |
$field_label: |
the field label |
|
string |
$field_info: |
the field info |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - 'format_info': Format of info content, see format_to_output() (string, default 'htmlbody')
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
true|string input_field(
[array
$field_params = array()]
)
|
|
Generate a general input field.
This is the base function for text_input(), checkbox_input(), ..
Parameters:
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
| Uses: | Form::get_input_element() - to generate the <input> element |
mixed password(
string
$field_name, string
$field_value, integer
$field_size, string
$field_label, [string
$field_note = ''], [integer
$field_maxlength = 0], [string
$field_class = '']
)
|
|
Builds a password input field.
Calls the text() method with a 'password' parameter.
Parameters:
|
string |
$field_name: |
the name of the input field |
|
string |
$field_value: |
initial value |
|
integer |
$field_size: |
size of the input field |
|
string |
$field_label: |
label displayed in front of the field |
|
string |
$field_note: |
note displayed with field |
|
integer |
$field_maxlength: |
max length of the value (if 0 field_size will be used!) |
|
string |
$field_class: |
the CSS class to use |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed password_input(
string
$field_name, string
$field_value, integer
$field_size, string
$field_label, [string
$field_params = array()], integer
5, string
6
)
|
|
Builds a password input field.
Calls the text_input() method with type == 'password'.
Parameters:
|
integer |
5: |
Max length of the value (if 0 field_size will be used!) |
|
string |
6: |
Extended attributes, see text_input(). |
|
string |
$field_name: |
The name of the input field. This gets used for id also, if no id given in $field_params. |
|
string |
$field_value: |
Initial value |
|
integer |
$field_size: |
Size of the input field |
|
string |
$field_label: |
Label displayed in front of the field |
|
string |
$field_params: |
Note displayed with field |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed radio(
string
$field_name, string
$field_value, array
$field_options, string
$field_label, [boolean
$field_lines = false], [string
$field_note = '']
)
|
|
Generate set of radio options.
Parameters:
|
string |
$field_name: |
the name of the radio options |
|
string |
$field_value: |
the checked option |
|
array |
$field_options: |
of arrays the radio options (0: value, 1: label, 2: notes, 3: additional HTML [input field, ..], 4: attribs for <input tag> ) |
|
string |
$field_label: |
label |
|
boolean |
$field_lines: |
options on seperate lines (DIVs) |
|
string |
$field_note: |
notes |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed radio_input(
string
$field_name, string
$field_value, array
$field_options, string
$field_label, [array
$field_params = array()]
)
|
|
Generate set of radio options.
Parameters:
|
string |
$field_name: |
The name of the radio options |
|
string |
$field_value: |
The checked option |
|
array |
$field_options: |
of arrays The radio options (keys: 'value', 'label', 'note', 'params' (array)). - 'note': Note for the option (string)
- 'input_suffix' (additional HTML [input field, ..])
- Plus everything for get_input_element() )
|
|
string |
$field_label: |
Label |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - lines: Options on seperate lines (DIVs) (boolean, default false)
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed select(
string
$field_name, string
$field_value, callback
$field_list_callback, string
$field_label, [string
$field_note = ''], [string
$field_class = ''], [string
$field_onchange = NULL]
)
|
|
Display a select field and populate it with a callback function.
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_value: |
default field value |
|
callback |
$field_list_callback: |
callback function |
|
string |
$field_label: |
field label to be display before the field |
|
string |
$field_note: |
note to be displayed after the field |
|
string |
$field_class: |
CSS class for select |
|
string |
$field_onchange: |
Javascript to add for onchange event (trailing ";"). |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed select_input(
string
$field_name, string
$field_value, callback
$field_list_callback, string
$field_label, [array
$field_params = array()]
)
|
|
Display a select field and populate it with a callback function.
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_value: |
default field value |
|
callback |
$field_list_callback: |
callback function |
|
string |
$field_label: |
field label to be display before the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: Nothing yet. |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed select_input_array(
string
$field_name, array
$field_options, string
$field_label, [array
$field_params = array()]
)
|
|
This is a stub for select_input_options() which builds the required list of <option> elements from a given list of options ($field_options) and the selected value ($field_value).
Parameters:
|
string |
$field_name: |
field name |
|
array |
$field_options: |
Options. If an associative key (string) is used, this gets the value attribute. |
|
string |
$field_label: |
Field label to be display before the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: |
API Tags:
mixed select_input_object(
string
$field_name, string
$field_value, DataObjectCache
&$field_object, string
$field_label, [array
$field_params = array()]
)
|
|
Display a select field and populate it with a cache object by using a callback method.
Parameters:
|
string |
$field_name: |
Field name |
|
string |
$field_value: |
Default field value |
|
DataObjectCache |
&$field_object: |
Cache containing values for list |
|
string |
$field_label: |
Field label to be display with the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - 'allow_none': allow to select [none] in list (boolean, default false)
- 'object_callback': Object's callback method name (string, default 'option_list_return')
- 'loop_object_method': The method on the objects inside the callback (string, default NULL)
|
API Tags:
mixed select_input_options(
string
$field_name, string
$field_options, string
$field_label, [array
$field_params = array()]
)
|
|
Display a select field and populate it with a cache object.
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_options: |
string containing options '<option>...</option>' |
|
string |
$field_label: |
field label to be display before the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - 'label': Field label to be display before the field
- 'class': CSS class for select
|
API Tags:
mixed select_object(
string
$field_name, string
$field_value, DataObjectCache
&$field_object, string
$field_label, [string
$field_note = ''], [boolean
$allow_none = false], [string
$field_class = ''], [string
$field_object_callback = 'option_list_return'], [string
$field_onchange = NULL]
)
|
|
Display a select field and populate it with a cache object.
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_value: |
default field value |
|
DataObjectCache |
&$field_object: |
Cache containing values for list |
|
string |
$field_label: |
field label to be display before the field |
|
string |
$field_note: |
note to be displayed after the field |
|
boolean |
$allow_none: |
allow to select [none] in list |
|
string |
$field_class: |
CSS class for select |
|
string |
$field_object_callback: |
Object's callback method name. |
|
string |
$field_onchange: |
Javascript to add for onchange event (trailing ";"). |
API Tags:
mixed select_options(
string
$field_name, string
$field_options, string
$field_label, [string
$field_note = NULL], [string
$field_class = NULL], [string
$field_onchange = NULL]
)
|
|
Display a select field and populate it with a cache object.
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_options: |
string containing options |
|
string |
$field_label: |
field label to be display before the field |
|
string |
$field_note: |
note to be displayed after the field |
|
string |
$field_class: |
CSS class for select |
|
string |
$field_onchange: |
Javascript to add for onchange event (trailing ";"). |
API Tags:
mixed submit(
array
$options
)
|
|
Builds a submit input tag
the array must contain :
- the name (optional)
- the value (optional)
- the class (optional)
- the onclick attribute (optional)
- the style (optional)
Parameters:
|
array |
$options: |
an array containing the elements of the input tags |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed submit_input(
[array
$field_params = array()]
)
|
|
Builds a submit input tag
the array must contain :
- the name (optional)
- the value (optional)
- the class (optional)
- the onclick attribute (optional)
- the style (optional)
Parameters:
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: Nothing yet. |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
Information Tags:
| Todo: | Use <div class="input"> for layout == 'fieldset' (property). |
void switch_layout(
string|NULL
$layout
)
|
|
Parameters:
|
string|NULL |
$layout: |
the form layout : 'fieldset', 'table' or ''; NULL to restore previsouly saved layout |
mixed text(
string
$field_name, string
$field_value, integer
$field_size, string
$field_label, [string
$field_note = ''], [integer
$field_maxlength = 0], [string
$field_class = ''], [string
$inputtype = 'text'], [
$force_to = '']
)
|
|
Builds a text (or password) input field.
Note: please use Form::password() for password fields
Parameters:
|
string |
$field_name: |
the name of the input field |
|
string |
$field_value: |
initial value |
|
integer |
$field_size: |
size of the input field |
|
string |
$field_label: |
label displayed in front of the field |
|
string |
$field_note: |
note displayed with field |
|
integer |
$field_maxlength: |
max length of the value (if 0 field_size will be used!) |
|
string |
$field_class: |
the CSS class to use |
|
string |
$inputtype: |
input type (only 'text' or 'password' makes sense) |
|
|
$force_to: |
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
void textarea(
string
$field_name, string
$field_value, integer
$field_rows, string
$field_label, [string
$field_note = ''], [integer
$field_cols = 50], [string
$field_class = '']
)
|
|
Build a text area.
Parameters:
|
string |
$field_name: |
|
|
string |
$field_value: |
|
|
integer |
$field_rows: |
|
|
string |
$field_label: |
|
|
string |
$field_note: |
|
|
integer |
$field_cols: |
|
|
string |
$field_class: |
|
API Tags:
void textarea_input(
string
$field_name, string
$field_value, integer
$field_rows, string
$field_label, [array
$field_params = array()]
)
|
|
Build a text area.
Parameters:
|
string |
$field_name: |
Name of the field |
|
string |
$field_value: |
Value of the field |
|
integer |
$field_rows: |
Number of rows |
|
string |
$field_label: |
Label for the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - 'cols': Number of columns (integer, default 50)
|
API Tags:
true|string text_input(
string
$field_name, string
$field_value, integer
$field_size, string
$field_label, [array
$field_params = array()]
)
|
|
Builds a text (or password) input field.
Note: please use Form::password_input() for password fields.
Parameters:
|
string |
$field_name: |
The name of the input field. This gets used for id also, if no id given in $field_params. |
|
string |
$field_value: |
Initial value |
|
integer |
$field_size: |
Size of the input field |
|
string |
$field_label: |
Label displayed with the field (in front by default, see $label_to_the_left). |
|
array |
$field_params: |
Extended attributes/params. - 'maxlength': if not set, $field_size gets used (use '' to disable it)
- 'class': the CSS class to use for the <input> element
- 'type': 'text', 'password' (defaults to 'text')
- 'force_to': 'UpperCase' (JS onchange handler)
- NOTE: any other attributes will be used as is (onchange, onkeyup, id, ..).
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed time(
string
$field_name, string
$field_value, string
$field_label, [
$field_format = 'hh:mm:ss']
)
|
|
Builds a time input field.
Parameters:
|
string |
$field_name: |
the name of the input field |
|
string |
$field_value: |
initial value (ISO datetime) |
|
string |
$field_label: |
label displayed in front of the field |
|
|
$field_format: |
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
mixed time_input(
string
$field_name, string
$field_value, string
$field_label, [array
$field_params = array()]
)
|
|
Builds a time input field.
Parameters:
|
string |
$field_name: |
The name of the input field |
|
string |
$field_value: |
Initial value (ISO datetime) |
|
string |
$field_label: |
Label displayed in front of the field |
|
array |
$field_params: |
Optional params. Additionally to $_common_params you can use: - 'time_format': Format of the time (string, default 'hh:mm:ss')
|
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
void time_select(
string
$field_name, [string
$field_value = NULL], [string
$precision = '5mn'], string
$field_label, [string
$field_note = NULL], [string
$field_class = NULL], [string
$field_onchange = NULL]
)
|
|
Builds a time select input field
Parameters:
|
string |
$field_name: |
field name |
|
string |
$field_value: |
initial value (ISO datetime or time only) |
|
string |
$precision: |
precison xmn or xsec (x:integer) for the options minutes or secondes |
|
string |
$field_label: |
field label to be display before the field |
|
string |
$field_note: |
note to be displayed after the field |
|
string |
$field_class: |
CSS class for select |
|
string |
$field_onchange: |
Javascript to add for onchange event (trailing ";"). |