I have to alter cities form field in checkout page under delivery section. I have to change it from a textfield to a select options dropdown.
- I have managed to do that using a separate template file for checkout page but I
am not able to use
#ajax
functionality of form field - In Drupal 6 it was possible using
hook_form_uc_cart_checkout_form_alter()
, but in Drupal 7 the address fields are rendered in a different way, and I'm not able to alter the address form fields as desired
What are other ways of changing it?
I used hook_form_alter()
with an #after_build
callback; I was able to change the field from text field to select option, but the #ajax
parameter attached to this is not working.
It seems like ajax callbacks are attached with the hooks at an early stage. Is there any way to have the #ajax property working?