You are here

function uc_recurring_subscription_form_alter in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_subscription/uc_recurring_subscription.module \uc_recurring_subscription_form_alter()

Implements hook_form_alter().

File

modules/uc_recurring_subscription/uc_recurring_subscription.module, line 280
Manage subscription/memberships.

Code

function uc_recurring_subscription_form_alter(&$form, $form_state, $form_id) {
  $aid = variable_get('uc_recurring_subscription_attribute', '');
  if (isset($form['aid']) && $form['aid']['#value'] == $aid) {

    // Hide critical options from forum vocabulary.
    if ($form_id == 'uc_attribute_form') {
      $form['help_subscription_attribute'] = array(
        '#value' => t('This is the designated subscription product attribute. Some of the normal attribute options have been disabled.'),
        '#weight' => -1,
      );
      $form['name']['#disabled'] = TRUE;
    }
  }
}