I added this code in my template.php

function PORTO_SUB_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'rapporto_di_lavoro_node_form') {

    $form['field_livello']['und']['#ajax'] = array(
                                  'callback' => 'my_test_callback',
                                  'wrapper' => 'callback_wrapper',
                                  'progress' => array(
                                    'message' => 'caricamento',
                                    'type' => 'throbber',
                                );        }}

function my_test_callback($form, &$form_state) {

When I select an item I can see the throbble, but no dpm() message. What's wrong?

As I'm still not modifying fields, I don't need to unset or indicate wrapper, aren’t I?


similar question is here.

Dynamic select list in the form (dependent dropdown)

you can get your solution from here.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.