skipv1_0_0radio

skip_radio( $name, $value, $args )
.

Description

skip\v1_0_0\radio( (string) $name, (string) $value, (constant) $label = FALSE, (array) $args = array() ); 

Adding a Radiobutton 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 Radiobutton 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  );

skip_radio( myradiovalue,, red, label=Red ); skip_radio( myradiovalue,, green, label=Green );

skip_form_end();

Getting back the saved data.

$value = skip_value( myformname , myradiovalue, );

Parameters (4)

0. $name (string)
Name of field.
1. $value (string)
The value of the checkbox element which will be saved if Radiobutton 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\radio' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'facebook-fanpage-import/includes/skip/elements/forms/radio.php'; 
  3.  
  4. // Name of field. 
  5. $name = ''; 
  6.  
  7. // The value of the checkbox element which will be saved if Radiobutton 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\radio($name, $value, $label, $args); 
  18.  

Defined (1)

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

/includes/skip/elements/forms/radio.php