function theme_button

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 form.inc theme_button($variables)
cle7 form.inc theme_button($variables)
elmsmedia7 form.inc theme_button($variables)
icor7 form.inc theme_button($variables)
meedjum_blog7 form.inc theme_button($variables)
mooc7 form.inc theme_button($variables)

Returns HTML for a button form element.

Parameters

$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #attributes, #button_type, #name, #value.

Related topics

1 theme call to theme_button()
theme_submit in includes/form.inc
Returns HTML for a submit button form element.
38 string references to the theme hook from theme_button()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

ajax_pre_render_element in includes/ajax.inc
Adds Ajax information about an element to communicate with JavaScript.
ctools_ajax_sample_ajax_button_form in sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module
Provide a form for an example ajax modal button
ctools_jump_menu in sites/all/modules/ulmus/ctools/includes/jump-menu.inc
Generate a jump menu form.
drupal_common_theme in includes/common.inc
Provides theme registration for themes across .inc files.
ember_links__ctools_dropbutton in sites/all/themes/ulmus/ember/template.php
Overrides theme_links__ctools_dropbutton().

... See full list

File

includes/form.inc, line 3793
Functions for form and batch generation and processing.

Code

function theme_button($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'submit';
  element_set_attributes($element, array('id', 'name', 'value'));

  $element['#attributes']['class'][] = 'form-' . $element['#button_type'];
  if (!empty($element['#attributes']['disabled'])) {
    $element['#attributes']['class'][] = 'form-button-disabled';
  }

  return '<input' . drupal_attributes($element['#attributes']) . ' />';
}