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???
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityUse 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.
I guess that like this
$form['commerce_discount_fields']['commerce_discount_offer'][LANGUAGE_NONE]['form']['commerce_fixed_amount'][LANGUAGE_NONE][0]['amount']