form_reset()

form_reset([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (string) – Button name $value (string) – Button value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML input reset button tag Return type: string Lets you generate a standard reset button. Use is identical to form_submit().

form_radio()

form_radio([$data = ''[, $value = ''[, $checked = FALSE[, $extra = '']]]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $checked (bool) – Whether to mark the radio button as being checked $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML radio input tag Return type: string This function is identical in all respects to the form_checkbox() function above except that it uses the “radio

form_prep()

form_prep($str) Parameters: $str (string) – Value to escape Returns: Escaped value Return type: string Allows you to safely use HTML and characters such as quotes within form elements without breaking out of the form. Note If you use any of the form helper functions listed in this page the form values will be prepped automatically, so there is no need to call this function. Use it only if you are creating your own form elements. Note This function is DEPRECATED and is just an ali

form_password()

form_password([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML password input field tag Return type: string This function is identical in all respects to the form_input() function above except that it uses the “password” input type.

form_open_multipart()

form_open_multipart([$action = ''[, $attributes = array()[, $hidden = array()]]]) Parameters: $action (string) – Form action/target URI string $attributes (array) – HTML attributes $hidden (array) – An array of hidden fields’ definitions Returns: An HTML multipart form opening tag Return type: string This function is absolutely identical to form_open() above, except that it adds a multipart attribute, which is necessary if you would like to use the form to upload files with.

form_open()

form_open([$action = ''[, $attributes = ''[, $hidden = array()]]]) Parameters: $action (string) – Form action/target URI string $attributes (array) – HTML attributes $hidden (array) – An array of hidden fields’ definitions Returns: An HTML form opening tag Return type: string Creates an opening form tag with a base URL built from your config preferences. It will optionally let you add form attributes and hidden input fields, and will always add the accept-charset attribute based o

form_multiselect()

form_multiselect([$name = ''[, $options = array()[, $selected = array()[, $extra = '']]]]) Parameters: $name (string) – Field name $options (array) – An associative array of options to be listed $selected (array) – List of fields to mark with the selected attribute $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML dropdown multiselect field tag Return type: string Lets you create a standard multiselect field. The firs

form_label()

form_label([$label_text = ''[, $id = ''[, $attributes = array()]]]) Parameters: $label_text (string) – Text to put in the <label> tag $id (string) – ID of the form element that we’re making a label for $attributes (string) – HTML attributes Returns: An HTML field label tag Return type: string Lets you generate a <label>. Simple example: echo form_label('What is your Name', 'username'); // Would produce: <label for="username">What is your Name</label> Simi

form_input()

form_input([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML text input field tag Return type: string Lets you generate a standard text input field. You can minimally pass the field name and value in the first and second parameter: echo form_input('username', 'johndoe'); Or you can pass an associ

form_hidden()

form_hidden($name[, $value = '']) Parameters: $name (string) – Field name $value (string) – Field value Returns: An HTML hidden input field tag Return type: string Lets you generate hidden input fields. You can either submit a name/value string to create one field: form_hidden('username', 'johndoe'); // Would produce: <input type="hidden" name="username" value="johndoe" /> ... or you can submit an associative array to create multiple fields: $data = array( 'name' =&