My Ajax call for my submit button does not work? I am building a form with the form builder but I can't even get my button to use its ajax function to callback. Instead of doing a normal ajax call on the page, it reloads the entire page. 

What am I doing wrong here? The DPM function doesn't even run, so i'm assuming i'm not even triggering the ajax call, but I have copy pasted the function name into the callback, so i'm not sure why its not triggering on submit?

  $form['suggested_actions']['list']['mentorship'] = array('#type' =&gt; 'container');
  $form['suggested_actions']['list']['mentorship']['text'] = array('#type' =&gt; 'markup', '#markup' =&gt; '');
  $form['suggested_actions']['list']['mentorship']['text']['#markup'] .= '&lt;span class="SugList"&gt;Mentorships - &lt;span id="mentorshipunconfirmed"&gt;Unconfirmed&lt;/span&gt;&lt;/span&gt;';
  $form['suggested_actions']['list']['mentorship']['button'] = array('#type' =&gt; 'button', '#button_type' =&gt; 'submit');
  $form['suggested_actions']['list']['mentorship']['button']['#name'] = 'Mentorships';
  $form['suggested_actions']['list']['mentorship']['button']['#attributes'] = array('data-title' =&gt; array('Mentorships'), 'class' =&gt; array('SA_Button'));
  $form['suggested_actions']['list']['mentorship']['button']['#value'] = 'Confirm Mentorships';
  $form['suggested_actions']['list']['mentorship']['button']['#ajax'] = array(
      'callback' =&gt; 'erc360_completeness_report_suggested_actions_mentorship_ajax',
      'wrapper' =&gt; 'mentorshipunconfirmed',
      'method' =&gt; 'replace',
      'effect' =&gt; 'none',
  );


  function erc360_completeness_report_suggested_actions_mentorship_ajax($form, $form_state){
      dpm("The AJAX FUNCTION has ran...");
      return $form['suggested_actions']['list']['mentorship']['text']['#markup'] = '&lt;span&gt;confirm&lt;/span&gt;';
  }
Try following code.

$form['suggested_actions']['list']['mentorship']['button']['#ajax'] = array(
  'callback' =&gt; 'erc360_completeness_report_suggested_actions_mentorship_ajax',
  'wrapper' =&gt; 'mentorshipunconfirmed',
  '#callback' =&gt; 'ajax_test',
  '#wrapper' =&gt; 'wrapper',
  'method' =&gt; 'replace',
  'effect' =&gt; 'fade',
);


function erc360_completeness_report_suggested_actions_mentorship_ajax($form, $form_state){
  dpm("The AJAX FUNCTION has ran...");
  $form['suggested_actions']['list']['mentorship']['text']['#markup'] = '&lt;span&gt;confirm&lt;/span&gt;';
  return $form['suggested_actions']['list']['mentorship']['text'];
}