You are here

function bs_shortcodes_container_attributes in Bootstrap 3 shortcodes 7

@file Adds attribute callbacks for shortcode wysiwyg integration @author Jurriaan Roelofs

See also

migrate-attributes-github2drupal.html

https://github.com/filipstefansson/bootstrap-3-shortcodes/blob/master/RE...

File

includes/bootstrap-shortcodes-attributes.inc, line 10
Adds attribute callbacks for shortcode wysiwyg integration @author Jurriaan Roelofs

Code

function bs_shortcodes_container_attributes($form, $form_state) {
  $form['fluid'] = array(
    '#type' => 'select',
    '#title' => t('fluid'),
    '#options' => array(
      '' => t('false'),
      'true' => t('true'),
    ),
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'container',
        ),
      ),
    ),
  );
  $form['xclass'] = array(
    '#type' => 'textfield',
    '#title' => t('xclass'),
    '#size' => 30,
    '#maxlength' => 30,
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'container',
        ),
      ),
    ),
  );
  $form['data'] = array(
    '#type' => 'textfield',
    '#title' => t('data'),
    '#size' => 30,
    '#maxlength' => 30,
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'container',
        ),
      ),
    ),
  );
  return $form;
}