function hook_commerce_coupon_coupon_entity_form_alter in Commerce Coupon 7.2
Specifically alter the coupon entity form wherever it is attached.
Parameters
array $form: The coupon entity form or form fragment
array $form_state: Typical form state
CommerceCoupon $coupon: The coupon being edited
1 function implements hook_commerce_coupon_coupon_entity_form_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
1 invocation of hook_commerce_coupon_coupon_entity_form_alter()
- commerce_coupon_attach_coupon_entity_form in ./
commerce_coupon.module - Attach a coupon entity form to a form or form fragment.
File
- ./
commerce_coupon.api.php, line 118
Code
function hook_commerce_coupon_coupon_entity_form_alter($form, $form_state, $coupon) {
// Do not allow access to the status flag on discount coupons.
if ($coupon->type == 'discount_coupon' && isset($form['status'])) {
$form['status']['#access'] = 0;
}
}