function ctools_ajax_sample_ajax_button_form

cis7 ctools_ajax_sample.module ctools_ajax_sample_ajax_button_form()
cle7 ctools_ajax_sample.module ctools_ajax_sample_ajax_button_form()
elmsmedia7 ctools_ajax_sample.module ctools_ajax_sample_ajax_button_form()
icor7 ctools_ajax_sample.module ctools_ajax_sample_ajax_button_form()
meedjum_blog7 ctools_ajax_sample.module ctools_ajax_sample_ajax_button_form()
mooc7 ctools_ajax_sample.module ctools_ajax_sample_ajax_button_form()

Provide a form for an example ajax modal button

1 call to ctools_ajax_sample_ajax_button_form()
ctools_ajax_sample_page in sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module
Page callback to display links and render a container for AJAX stuff.

File

sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module, line 737
Sample AJAX functionality so people can see some of the CTools AJAX features in use.

Code

function ctools_ajax_sample_ajax_button_form() {
  $form = array();

  $form['url'] = array(
    '#type' => 'hidden',
    
    // The name of the class is the #id of $form['ajax_button'] with "-url"
    // suffix.
    '#attributes' => array('class' => array('ctools-ajax-sample-button-url')),
    '#value' => url('ctools_ajax_sample/nojs/animal'),
  );

  $form['ajax_button'] = array(
    '#type' => 'button',
    '#value' => 'Wizard (button modal)',
    '#attributes' => array('class' => array('ctools-use-modal')),
    '#id' => 'ctools-ajax-sample-button',
  );

  return $form;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.