Drupal 7 disable submit button

Here’s how to disable the submit and preview buttons in a Drupal module.

$form[‘actions’][‘submit’][‘#disabled’] = TRUE;
$form[‘actions’][‘preview’][‘#disabled’] = TRUE;

Reference:
http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#actions

Advertisements
Tagged with:
Posted in drupal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: