Procedural File: _functions_forms.php
Source Location: /blogs/b2evocore/_functions_forms.php
Functions
mixed form_checkbox(
string $field_name, boolean $field_value, string $field_label, [string $field_note = ''], [string $field_class = ''], boolean 5
)
|
|
form_checkbox(-)
Parameters:
|
boolean |
5: |
to output (default) or not |
|
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 |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
form_checkbox_tr [line 218]
void form_checkbox_tr(
$field_name, $field_value, $field_label, [ $field_note = ''], [ $field_class = '']
)
|
|
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_class: |
|
form_formstart [line 271]
void form_formstart(
$action, [ $class = ''], [ $name = ''], [ $method = 'get'], [ $id = '']
)
|
|
creates a form header and puts GET params of $action into hidden form inputs
Parameters:
|
|
$action: |
|
|
|
$class: |
|
|
|
$name: |
|
|
|
$method: |
|
|
|
$id: |
|
void form_info(
$field_label, $field_info, [ $field_note = '']
)
|
|
Parameters:
|
|
$field_label: |
|
|
|
$field_info: |
|
|
|
$field_note: |
|
void form_info_tr(
$field_label, $field_info, [ $field_note = '']
)
|
|
Parameters:
|
|
$field_label: |
|
|
|
$field_info: |
|
|
|
$field_note: |
|
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 (0: value, 1: label, 2: notes) |
|
string |
$field_label: |
label |
|
boolean |
$field_lines: |
options on seperate lines (DIVs) |
|
string |
$field_notes: |
notes |
void form_select(
$field_name, $field_value, $field_list_callback, $field_label, [ $field_note = ''], [ $field_class = '']
)
|
|
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_list_callback: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_class: |
|
form_select_object [line 118]
void form_select_object(
$field_name, $field_value, &$field_object, $field_label, [ $field_note = ''], [ $allow_none = false], [ $field_class = '']
)
|
|
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
&$field_object: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$allow_none: |
|
|
|
$field_class: |
|
void form_submit(
[ $submit_attribs = '']
)
|
|
Parameters:
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']
)
|
|
builds an 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) |
API Tags:
| Return: | true (if output) or the generated HTML if not outputting |
void form_textarea(
$field_name, $field_value, $field_rows, $field_label, [ $field_note = ''], [ $field_cols = 50], [ $field_class = '']
)
|
|
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_rows: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_cols: |
|
|
|
$field_class: |
|
void form_text_tr(
$field_name, $field_value, $field_size, $field_label, [ $field_note = ''], [ $field_maxlength = 0], [ $field_class = '']
)
|
|
Parameters:
|
|
$field_name: |
|
|
|
$field_value: |
|
|
|
$field_size: |
|
|
|
$field_label: |
|
|
|
$field_note: |
|
|
|
$field_maxlength: |
|
|
|
$field_class: |
|