Skip to main content
added 53 characters in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

I have a fairly basic question I think. I've written a module that uses hook_form_alter to alter the fields in a product form.

But now I'd like to change the fields in the form for a different product and I was thinking of using my custom module to do so.

However, when I use the DevelDevel module to try and find the specific $form_id for each of my created product forms I see they ALL have the SAME name: commerce_checkout_form_checkout. Soooo, I'm not sure how to target a specific form.

Moreover, I've used dpm()dpm() to check the variables in the forms and they all have the exact same values for everything. Even across product types. The only value that is different is #build_id#build_id but this changes for every form load so it can't be targeted.

Anyone know how to do this?

I have a fairly basic question I think. I've written a module that uses hook_form_alter to alter the fields in a product form.

But now I'd like to change the fields in the form for a different product and I was thinking of using my custom module to do so.

However, when I use Devel to try and find the specific $form_id for each of my created product forms I see they ALL have the SAME name: commerce_checkout_form_checkout. Soooo, I'm not sure how to target a specific form.

Moreover, I've used dpm() to check the variables in the forms and they all have the exact same values for everything. Even across product types. The only value that is different is #build_id but this changes for every form load so it can't be targeted.

Anyone know how to do this?

I have a fairly basic question I think. I've written a module that uses hook_form_alter to alter the fields in a product form.

But now I'd like to change the fields in the form for a different product and I was thinking of using my custom module to do so.

However, when I use the Devel module to try and find the specific $form_id for each of my created product forms I see they ALL have the SAME name: commerce_checkout_form_checkout. Soooo, I'm not sure how to target a specific form.

Moreover, I've used dpm() to check the variables in the forms and they all have the exact same values for everything. Even across product types. The only value that is different is #build_id but this changes for every form load so it can't be targeted.

Anyone know how to do this?

edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
added 256 characters in body
Source Link
Sage
  • 2.5k
  • 27
  • 46

I have a fairly basic question I think. I've written a module that uses hook_form_alter to alter the fields in a product form.

But now I'd like to change the fields in the form for a different product and I was thinking of using my custom module to do so.

However, when I use Devel to try and find the specific $form_id for each of my created product forms I see they ALL have the SAME name: commerce_checkout_form_checkout. Soooo, I'm not sure how to target a specific form.

Moreover, I've used dpm() to check the variables in the forms and they all have the exact same values for everything. Even across product types. The only value that is different is #build_id but this changes for every form load so it can't be targeted.

Anyone know how to do this?

I have a fairly basic question I think. I've written a module that uses hook_form_alter to alter the fields in a product form.

But now I'd like to change the fields in the form for a different product and I was thinking of using my custom module to do so.

However, when I use Devel to try and find the specific $form_id for each of my created product forms I see they ALL have the SAME name: commerce_checkout_form_checkout. Soooo, I'm not sure how to target a specific form.

Anyone know how to do this?

I have a fairly basic question I think. I've written a module that uses hook_form_alter to alter the fields in a product form.

But now I'd like to change the fields in the form for a different product and I was thinking of using my custom module to do so.

However, when I use Devel to try and find the specific $form_id for each of my created product forms I see they ALL have the SAME name: commerce_checkout_form_checkout. Soooo, I'm not sure how to target a specific form.

Moreover, I've used dpm() to check the variables in the forms and they all have the exact same values for everything. Even across product types. The only value that is different is #build_id but this changes for every form load so it can't be targeted.

Anyone know how to do this?

Tweeted twitter.com/StackDrupal/status/696524272567771137
edited title
Link
Adrian Cid Almaguer
  • 18.5k
  • 14
  • 79
  • 133
Loading
deleted 45 characters in body; edited tags
Source Link
Adrian Cid Almaguer
  • 18.5k
  • 14
  • 79
  • 133
Loading
Source Link
Sage
  • 2.5k
  • 27
  • 46
Loading