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 the element.
  • after_element (string) Content after the element.
  • 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' = myelementid,, 'label' => City ); skip_autocomplete( overeighteen, yes, $args );

skip_form_end();

Getting back the saved data.

$city = skip_value( myformname , overeighteen );

Parameters (4)

0. $name (string)
The name of the checkbox field.
1. $value (string)
The value of the checkbox element which will be saved if box is checked.
2. $label — Optional. (constant) => FALSE
List of Arguments.
3. $args — Optional. (array) => array()
The args.

Usage

  1. if ( !function_exists( 'skip\v1_0_0\checkbox' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'facebook-fanpage-import/includes/skip/elements/forms/checkbox.php'; 
  3.  
  4. // The name of the checkbox field. 
  5. $name = ''; 
  6.  
  7. // The value of the checkbox element which will be saved if box is checked. 
  8. $value = ''; 
  9.  
  10. // List of Arguments. 
  11. $label = FALSE; 
  12.  
  13. // The args. 
  14. $args = array(); 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = skip\v1_0_0\checkbox($name, $value, $label, $args); 
  18.  

Defined (1)

The function is defined in the following location(s).

/includes/skip/elements/forms/checkbox.php