form_textarea()

form_textarea([$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 textarea tag Return type: string This function is identical in all respects to the form_input() function above except that it generates a “textarea” type. Note Instead of the maxlength and size attributes in the above example, you wi

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_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_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_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_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_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_fieldset()

form_fieldset([$legend_text = ''[, $attributes = array()]]) Parameters: $legend_text (string) – Text to put in the <legend> tag $attributes (array) – Attributes to be set on the <fieldset> tag Returns: An HTML fieldset opening tag Return type: string Lets you generate fieldset/legend fields. Example: echo form_fieldset('Address Information'); echo "<p>fieldset content here</p>\n"; echo form_fieldset_close(); /* Produces: <fieldse

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_fieldset_close()

form_fieldset_close([$extra = '']) Parameters: $extra (string) – Anything to append after the closing tag, as is Returns: An HTML fieldset closing tag Return type: string Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it which will be added below the tag. For example $string = '</div></div>'; echo form_fieldset_close($string); // Would produce: </fieldset></div></div>