i am using drupal 7
i am trying to add a button within form and successful. now i want to call a function when someone click on that button
here is my code.
function clicktell_form_alter(&$form, &$form_state, $form_id) {
//print_r($form);
if($form_id=='user_register_form') {
$form['add_button'] = array(
'#type' => 'button',
'#value' => 'Verifynow',
'#ajax'> array (
'callback' => '_udr_ajax_handler',
'progress' => FALSE,
),
);
}
}
function _udr_ajax_handler($form, &$form_state) {
echo "hello "; exit;
}
But this is not working fine. Does anybody tell me how to solve this Thanks