Skip to content

westcoastdigital/beaver-builder-toggle-field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

<h1>Using the Field</h2>
<h3>How to Load</h3>
<p>To load the field, unzip to your plugin folder and then run the following function</p>

<code>
  function fp_add_toggle() {
    
        include( plugin_dir_path( __FILE__ ) . '/beaver-builder-toggle-field/toggle.php');
    
}
add_action( 'init', 'fp_add_toggle' );
</code>

<h3>Basic Usage</h3>

<code>
'my_field'     => array(
'type'          => 'toggle',
'label'         => __( 'Toggle Field', 'fl_builder' ),
), 
</code>

<h3>Settings</h3>
<p>You can change the labels and values from True and False, change the active and non active colour and have up to three buttons</p>

<code>
'toggle'     => array(
'type'          => 'toggle',
'label'         => __( 'Toggle Field', 'fl_builder' ),
'default'       => 'no',
'options'       => array(
  'yes'         => 'Yes',
  'no'          => 'No',
  'maybe'       => 'Maybe',
),
'oncolor'         => 'red',
'offcolor'        => '#d9edf7',
), 
</code>

About

Adds a toggle field for Beaver Builder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages