form_inputs
in package
Class html_form_inputs
Tags
Table of Contents
Methods
- hidden() : string
- Generiert ein verstecktes Feld
- inputwithdesc() : string
- Generates an input field with a description in a form group.
- inputwithoutdesc() : string
- Generates an input field without a description in a form group.
- rangewithdesc() : string
- Create a range slider input field with a label and description.
- rowinputwithdesc() : string
- Generates a form row with an input field and description.
- rowinputwithoutdesc() : string
- Create a row input field without a description.
- rowinputwithoutdescwsubmit() : string
- rowtextareasummernotewithdesc() : string
- switchwithdesc() : string
- Create a switch input field with a label and description.
- textareasummernotewithdesc() : string
- Generate textarea with description using Summernote editor
- getform() : string
- Generiert die Bootstrap-Form Control für Input Label und falls nötig Beschreibung
- getformdesc() : string
- Generiert die Beschreibung für ein Formularfeld
- getinputwdesc() : string
- Get input with description
- getlabel() : string
- Generiert das Label eines Inputs
Methods
hidden()
Generiert ein verstecktes Feld
public
hidden(string $name, string $id, string $value) : string
Parameters
- $name : string
-
Name des Feldes
- $id : string
-
ID des Feldes
- $value : string
-
Wert
Return values
string —- Generierter String
inputwithdesc()
Generates an input field with a description in a form group.
public
inputwithdesc(string $type, string $label, string $name, string $id, string $placeholder, string $desc[, string $value = '' ][, string $class = '' ][, string $auto = 'on' ][, string $disabled = '' ][, string $required = '' ]) : string
Parameters
- $type : string
-
The type of input field.
- $label : string
-
The label for the input field.
- $name : string
-
The name attribute of the input field.
- $id : string
-
The id attribute of the input field.
- $placeholder : string
-
The placeholder attribute of the input field.
- $desc : string
-
The description for the input field.
- $value : string = ''
-
The value attribute of the input field. Default is empty string.
- $class : string = ''
-
The class attribute of the input field. Default is empty string.
- $auto : string = 'on'
-
The auto attribute of the input field. Default is 'on'.
- $disabled : string = ''
-
The disabled attribute of the input field. Default is empty string.
- $required : string = ''
-
The required attribute of the input field. Default is empty string.
Return values
string —The generated input field string.
inputwithoutdesc()
Generates an input field without a description in a form group.
public
inputwithoutdesc(string $type, string $label, string $name, string $id, string $placeholder[, string $value = '' ][, string $class = '' ][, string $auto = 'on' ][, string $disabled = '' ][, string $required = '' ]) : string
Parameters
- $type : string
-
The type of input field.
- $label : string
-
The label for the input field.
- $name : string
-
The name attribute of the input field.
- $id : string
-
The id attribute of the input field.
- $placeholder : string
-
The placeholder attribute of the input field.
- $value : string = ''
-
The value attribute of the input field. Default is empty string.
- $class : string = ''
-
The class attribute of the input field. Default is empty string.
- $auto : string = 'on'
-
The auto attribute of the input field. Default is 'on'.
- $disabled : string = ''
-
The disabled attribute of the input field. Default is empty string.
- $required : string = ''
-
The required attribute of the input field. Default is empty string.
Return values
string —The generated input field string.
rangewithdesc()
Create a range slider input field with a label and description.
public
rangewithdesc(string $label, string $name, string $id, string $desc, string $value, string $min, string $max[, string $class = '' ]) : string
Parameters
- $label : string
-
The label for the input field.
- $name : string
-
The name attribute for the input field.
- $id : string
-
The ID attribute for the input field.
- $desc : string
-
The description for the input field.
- $value : string
-
The current value of the input field.
- $min : string
-
The minimum value of the range slider.
- $max : string
-
The maximum value of the range slider.
- $class : string = ''
-
Optional CSS class(es) to be added to the input field.
Return values
string —The HTML representation of the range slider input field.
rowinputwithdesc()
Generates a form row with an input field and description.
public
rowinputwithdesc(string $type, string $label, string $name, string $id, string $placeholder, string $desc[, string $value = '' ][, string $class = '' ][, string $auto = 'on' ][, string $disabled = '' ][, string $required = '' ]) : string
Parameters
- $type : string
-
Type of the input field (Allowed values: text, date, number, color, etc.)
- $label : string
-
Label for the input field
- $name : string
-
Post name of the input field
- $id : string
-
ID of the input field
- $placeholder : string
-
Placeholder text for the input field
- $desc : string
-
Description text for the input field
- $value : string = ''
-
[Optional] Value for the input field (default: empty string)
- $class : string = ''
-
[Optional] Additional CSS classes for the input field (default: empty string)
- $auto : string = 'on'
-
[Optional] Autocomplete value for the input field (default: "on")
- $disabled : string = ''
-
[Optional] Disabled status for the input field (default: empty string)
- $required : string = ''
-
[Optional] Required status for the input field (default: empty string)
Return values
string —Generated HTML string for the form row
rowinputwithoutdesc()
Create a row input field without a description.
public
rowinputwithoutdesc(string $type, string $label, string $name, string $id, string $placeholder[, string $value = '' ][, string $class = '' ][, string $auto = 'on' ][, string $disabled = '' ][, string $required = '' ]) : string
Parameters
- $type : string
-
The type of the input field (e.g. "text").
- $label : string
-
The label for the input field.
- $name : string
-
The name attribute for the input field.
- $id : string
-
The ID attribute for the input field.
- $placeholder : string
-
The placeholder attribute for the input field.
- $value : string = ''
-
Optional value attribute for the input field.
- $class : string = ''
-
Optional CSS class(es) to be added to the input field and label.
- $auto : string = 'on'
-
Optional "auto" attribute for the input field.
- $disabled : string = ''
-
Optional "disabled" attribute for the input field.
- $required : string = ''
-
Optional "required" attribute for the input field.
Return values
string —The HTML representation of the row input field.
rowinputwithoutdescwsubmit()
public
rowinputwithoutdescwsubmit(string $type, string $label, string $name, string $id, string $placeholder[, string $value = '' ][, string $class = '' ][, string $auto = 'on' ][, string $disabled = '' ][, string $required = '' ]) : string
Parameters
- $type : string
- $label : string
- $name : string
- $id : string
- $placeholder : string
- $value : string = ''
- $class : string = ''
- $auto : string = 'on'
- $disabled : string = ''
- $required : string = ''
Return values
stringrowtextareasummernotewithdesc()
public
rowtextareasummernotewithdesc(string $label, string $name, string $id, string $desc[, string $value = '' ][, string $required = '' ]) : string
Parameters
- $label : string
- $name : string
- $id : string
- $desc : string
- $value : string = ''
- $required : string = ''
Return values
stringswitchwithdesc()
Create a switch input field with a label and description.
public
switchwithdesc(string $type, string $label, string $name, string $id, string $desc, string $value[, string $class = '' ][, string $checked = '' ]) : string
Parameters
- $type : string
-
The type of the input field (e.g. "checkbox").
- $label : string
-
The label for the input field.
- $name : string
-
The name attribute for the input field.
- $id : string
-
The ID attribute for the input field.
- $desc : string
-
The description for the input field.
- $value : string
-
The value attribute for the input field.
- $class : string = ''
-
Optional CSS class(es) to be added to the input field.
- $checked : string = ''
-
Optional "checked" attribute for the input field.
Return values
string —The HTML representation of the switch input field.
textareasummernotewithdesc()
Generate textarea with description using Summernote editor
public
textareasummernotewithdesc(string $label, string $name, string $id, string $desc[, string $value = '' ][, string $required = '' ]) : string
Parameters
- $label : string
-
The label for the textarea
- $name : string
-
The name of the textarea
- $id : string
-
The id of the textarea
- $desc : string
-
The description of the textarea
- $value : string = ''
-
(optional) The value of the textarea
- $required : string = ''
Return values
string —The textarea HTML code
getform()
Generiert die Bootstrap-Form Control für Input Label und falls nötig Beschreibung
private
getform([string $type = '' ]) : string
Parameters
- $type : string = ''
-
Typ der zu generierenden Form-Control
Return values
string —- generierte Form-Control
getformdesc()
Generiert die Beschreibung für ein Formularfeld
private
getformdesc(string $id, string $desc[, string $class = '' ]) : string
Parameters
- $id : string
-
ID des Formularfelds
- $desc : string
-
Beschreibungstext des Formularfelds
- $class : string = ''
-
zusätzliche CSS-Klassen (optional)
Return values
string —- Generierter String
getinputwdesc()
Get input with description
private
getinputwdesc(string $type, string $name, string $id, string $placeholder, string $value, string $class, string $auto, string $disabled, string $required) : string
Parameters
- $type : string
-
The type of input
- $name : string
-
The name of input
- $id : string
-
The id of input
- $placeholder : string
-
The placeholder for input
- $value : string
-
The value of input
- $class : string
-
The CSS class of input
- $auto : string
-
The autocomplete attribute of input
- $disabled : string
-
The disabled attribute of input
- $required : string
-
The required attribute of input
Return values
string —The input HTML code
getlabel()
Generiert das Label eines Inputs
private
getlabel(string $id, string $label[, string $class = '' ]) : string
Parameters
- $id : string
-
ID des Inputs
- $label : string
-
Labeltext
- $class : string = ''
-
(optional) CSS-Klasse
Return values
string —- generierte Label