Drop down triggering image_button callback I have a custom form with 2 dropdowns which trigger an ajax callback on change and change the html inside a wrapper. If I use a submit input with this form which has its own submit callback function, it works fine but if I change the input to image_button with same callback function, changing the values in dropdown ends up triggering image_button callback.

$form['fieldset1'] = array(
    '#type' =&gt; 'fieldset',
    '#title' =&gt; t( 'Fieldset Title' ),
    '#title_display' =&gt; 'invisible'
);
$form['fieldset1']['select1'] = array(
      '#type' =&gt; 'select',
      '#title' =&gt; t( 'Select 1' ),
      '#title_display' =&gt; 'invisible',
      '#options' =&gt; $options,
      '#default_value' =&gt; $default_value1,
      '#ajax' =&gt; array(
          'event' =&gt; 'change',
          'callback' =&gt; 'select1_callback',
          'wrapper' =&gt; 'my_wrapper_id',
          'method' =&gt; 'replace',
          'prevent' =&gt; 'click',
          'effect' =&gt; 'fade'
      )
  );
$form['fieldset1'] ['select1'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t( 'Select 2' ),
    '#title_display' =&gt; 'invisible',
    '#options' =&gt; array_combine( range( 1, 10 ), range( 1, 10 ) ),
    '#default_value' =&gt; $default_value2,
    '#ajax' =&gt; array(
        'event' =&gt; 'change',
        'callback' =&gt; 'select2_callback',
        'wrapper' =&gt; 'my_wrapper_id',
        'method' =&gt; 'replace',
        'prevent' =&gt; 'click',
        'effect' =&gt; 'fade'
    )
);
$form['fieldset1']['to_be_changed'] = array(
    '#type' =&gt; 'item',
    '#prefix' =&gt; '&lt;div id="my_wrapper_id" &gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
    '#title' =&gt; $to_be_changed_value,
);
//This works.
$form['fieldset1']['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t( 'Submit Button Value' ),
    '#submit' =&gt; array( 'button_callback_function' )
);
//This doesn't work. The button works but dropdown callbacks call button callback
$form['fieldset1']['image_button'] = array(
    '#type' =&gt; 'image_button',
    '#name' =&gt; 'image_button_name',
    '#value' =&gt; t( 'Image Button Value' ),
    '#src' =&gt; drupal_get_path( 'module', 'my_module' ) . '/assets/img/image.png',
    '#submit' =&gt; array( 'button_callback_function' )
);


Not sure what I'm missing over here.
Found the problem with the code. Image_button won't have any #value. It will only have return_value which in this case can be same as what I was putting in #value.

    $form['fieldset1']['image_button'] = array(
    '#type' =&gt; 'image_button',
    '#name' =&gt; 'image_button_name',
    '#return_value' =&gt; t( 'Image Button Value' ),
    '#src' =&gt; drupal_get_path( 'module', 'my_module' ) . '/assets/img/image.png',
    '#submit' =&gt; array( 'button_callback_function' )
);