You are here

function shortcode_basic_tags_random_attributes in Shortcode 7.2

Attributes form element for random Shortcode.

Used by shortcode_wysiwyg module to add form elements for attributes.

1 string reference to 'shortcode_basic_tags_random_attributes'
shortcode_basic_tags_shortcode_info in shortcode_basic_tags/shortcode_basic_tags.module
Implements hook_shortcode_info().

File

shortcode_basic_tags/shortcode_basic_tags.module, line 937
Provides basic ShortCodes (as examples).

Code

function shortcode_basic_tags_random_attributes($form, &$form_state) {
  $form['random-length'] = array(
    '#title' => t('Length'),
    '#type' => 'textfield',
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'random',
        ),
      ),
    ),
  );
  return $form;
}