skipv1_0_0select

skip_select( $name, $elements, $args );
.

Description

skip\v1_0_0\select( (string) $name, (array/string) $elements, (constant) $label = FALSE, (array) $args = array() ); 

Adding a select field.

Default UsageThis will create an automated saved select field with values 1 till 10.

Parameters

$name // (string) (required) The name of the field.
$elements // (array/string) (required) The elements to show in Select.
$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 select field with values Opion 1 till 3 in a form.

skip_form_start( myformname  );

$elements = array( array( label, => Option 1, value => 1 ), array( label, => Option 2, value => 2 ), array( label, => Option 3, value => 3 ), );

$args = array( 'id' = myelementid, label, => Option ); skip_select( myselect, $elements, $args );

skip_form_end();

Getting back the saved data.

$value = skip_value( myformname , myselect );

Parameters (4)

0. $name (string)
The name of the checkbox field.
1. $elements (array/string)
The elements to show in Select.
2. $label — Optional. (constant) => FALSE
List of Arguments.
3. $args — Optional. (array) => array()
The args.

Usage

  1. if ( !function_exists( 'skip\v1_0_0\select' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'facebook-fanpage-import/includes/skip/elements/forms/select.php'; 
  3.  
  4. // The name of the checkbox field. 
  5. $name = ''; 
  6.  
  7. // The elements to show in Select. 
  8. $elements = null; 
  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\select($name, $elements, $label, $args); 
  18.  

Defined (1)

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

/includes/skip/elements/forms/select.php