0

I have form field name like

name="commerce_discount_fields[commerce_discount_offer][und][form][commerce_fixed_amount][und][0][amount]" value="" size="10" maxlength="128" class="form-text required" type="text">

How to get value in form alter???

3

Use the following code in validate or submit to get the % off form field value.

$value = $form_state['values']['commerce_discount_fields']['commerce_discount_offer'][LANGUAGE_NONE]['form']['commerce_percentage'][LANGUAGE_NONE][0]['value'];

Hope this will help you.

0

I guess that like this

$form['commerce_discount_fields']['commerce_discount_offer'][LANGUAGE_NONE]['form']['commerce_fixed_amount'][LANGUAGE_NONE][0]['amount']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy