skipv1_0_0checkbox
skip_checkbox( $name, $value, $elements, $args );.
Description
skip\v1_0_0\checkbox( (string) $name, (string) $value, (constant) $label = FALSE, (array) $args = array() );
Adding a checkbox
field.
Default UsageThis will create an automated saved checkbox
field.
Parameters
$name
// (string) (required) The name of the field.
$value
// (string) (required) The value of the checkbox
element
which will be saved if box is checked.
$args
// (array/string) (optional) Values for further settings.
$args
Settings
- id (string) ID if the HTML
Element
. - label (string) Label for
Element
. - default (string) Default Value if no Value is set before ('checked' if value have to be checked on default).
- classes (string) Name of CSS Classes which will be inserted into HTML seperated by empty space.
- before_
element
(string) Content before theelement
. - after_
element
(string) Content after theelement
. - save (boolean) TRUE if value of field have to be saved in Database, FALSE if not (default TRUE).
Example
Creating a labeled Checkbox in an automatic saved form.
skip_form_start( myformname );
$args
= array(
'id' = myelement
id,,
'label' => City
);
skip_autocomplete( overeighteen, yes, $args
);
skip_form_end(…);
Getting back the saved data.
$city
= skip_value( myformname , overeighteen );
Parameters (4)
Usage
if ( !function_exists( 'skip\v1_0_0\checkbox' ) ) { require_once ABSPATH . PLUGINDIR . 'facebook-fanpage-import/includes/skip/elements/forms/checkbox.php'; } // The name of the checkbox field. $name = ''; // The value of the checkbox element which will be saved if box is checked. $value = ''; // List of Arguments. $label = FALSE; // The args. $args = array(); // NOTICE! Understand what this does before running. $result = skip\v1_0_0\checkbox($name, $value, $label, $args);
Defined (1)
The function is defined in the following location(s).