Procedural File: _form.funcs.php
Source Location: /blogs/inc/_core/ui/forms/_form.funcs.php
Functions
mixed form_checkbox(
string $field_name, boolean $field_value, string $field_label, [string $field_note = ''], [string $field_class = ''], [boolean $output = true]
)
|
|
form_checkbox(-)
Parameters:
|
string |
$field_name: |
the name of the checkbox |
|
boolean |
$field_value: |
initial value |
|
string |
$field_label: |
label |
|
string |
$field_note: |
note |
|
string |
$field_class: |
CSS class |
|
boolean |
$output: |
to output (default) or not |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
| Deprecated: | Deprecated by (@link Form::checkbox()) |
form_checkbox_tr [line 431]
void form_checkbox_tr(
$field_name, $field_value, $field_label, [ $field_note = ''], [ $field_class = '']
)
|
|
form_checkbox_tr(-)
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_class: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::checkbox_input()) |
End an input field.
A field is a fieldset containing a label div and an input div.
API Tags:
| Deprecated: | Deprecated by (@link Form::end_field()) |
form_fieldstart [line 73]
void form_fieldstart(
$field_name, $field_label
)
|
|
Start an input field.
A field is a fielset containing a label div and an input div.
Parameters:
|
|
$field_name: |
|
|
|
$field_label: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::begin_field()) |
form_formstart [line 491]
void form_formstart(
$action, [ $class = ''], [ $name = ''], [ $method = 'get'], [ $id = '']
)
|
|
Builds a form header and puts GET params of $action into hidden form inputs
Parameters:
|
|
$action: |
|
|
|
$class: |
|
|
|
$name: |
|
|
|
$method: |
|
|
|
$id: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::begin_form()) |
void form_groupend(
[ $title = '']
)
|
|
End an field group.
Fieldset with legend.
Parameters:
API Tags:
| Deprecated: | Deprecated by (@link Form::end_fieldset()) |
form_groupstart [line 46]
void form_groupstart(
[ $title = '']
)
|
|
Start an field group.
Fieldset with legend.
Parameters:
API Tags:
| Deprecated: | Deprecated by (@link Form::begin_fieldset()) |
string form_hidden(
string $field_name, string $field_value, [ $display = true]
)
|
|
Builds a hidden field.
Parameters:
|
string |
$field_name: |
name |
|
string |
$field_value: |
value |
|
|
$display: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::button_input()) |
void form_info(
$field_label, $field_info, [ $field_note = '']
)
|
|
form_info(-)
Parameters:
|
|
$field_label: |
|
|
|
$field_info: |
|
|
|
$field_note: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::info_field()) |
End an info field.
An info field is a fielset containing a label div and an info div.
API Tags:
| Deprecated: | Deprecated by (@link Form::info_field()) |
void form_infostart(
$field_label
)
|
|
Start an info field.
An info field is a fielset containing a label div and an info div.
Parameters:
API Tags:
| Deprecated: | Deprecated by (@link Form::info_field()) |
void form_info_tr(
$field_label, $field_info, [ $field_note = '']
)
|
|
form_info_tr(-)
Parameters:
|
|
$field_label: |
|
|
|
$field_info: |
|
|
|
$field_note: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::info_field()) |
void form_radio(
string $field_name, string $field_value, array $field_options, string $field_label, [boolean $field_lines = false], [string $field_notes = '']
)
|
|
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_notes: |
notes |
API Tags:
| Deprecated: | Deprecated by (@link Form::radio_input()) |
void form_select(
string $field_name, string $field_value, callback $field_list_callback, string $field_label, [string $field_note = ''], [string $field_class = '']
)
|
|
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 |
API Tags:
| Deprecated: | Deprecated by (@link Form::select_input()) |
form_select_object [line 305]
void form_select_object(
string $field_name, string $field_value, DataObjectCache &$field_object, string $field_label, [string $field_note = ''], [boolean $allow_none = false], [string $field_class = '']
)
|
|
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 (get_option_list() gets called on it) |
|
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 |
API Tags:
| Deprecated: | Deprecated by (@link Form::select_object()) |
void form_submit(
[ $submit_attribs = '']
)
|
|
Parameters:
API Tags:
| Deprecated: | Deprecated by (@link Form::end_form()) |
mixed form_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'], [boolean $output = true]
)
|
|
Builds a text (or password) input field.
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) |
|
boolean |
$output: |
display (default) or return |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
| Deprecated: | Deprecated by (@link Form::text_input()) |
void form_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:
| Deprecated: | Deprecated by (@link Form::textarea_input()) |
void form_text_tr(
$field_name, $field_value, $field_size, $field_label, [ $field_note = ''], [ $field_maxlength = 0], [ $field_class = '']
)
|
|
form_text_tr(-)
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_size: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_maxlength: |
|
|
|
$field_class: |
|
API Tags:
| Deprecated: | Deprecated by (@link Form::text_input()) |