Hi member
I crated the form , which contains some text fields and option button,
I want to submit the form using ajax submit,
Can one guide me, how do submit the form using ajax,(without page reload),,
$form['city'] = array( '#id' =>'testcity', '#title' => t('Where'), '#type' => 'radios', '#description' => t(''), '#options' => array(t('City'),t('Address')), '#default_value' => variable_get('city', 0), '#required' => TRUE, '#attributes' => array('onclick' => "javascript:callform(this.value)"), );
$form['txtWhere'] = array( '#title' => t('Where'), '#type' => 'textfield', '#description' => t(''), '#required' => TRUE, );
$form['txtChkIn'] = array( '#title' => t('Check-In'), '#type' => 'textfield', '#description' => t(''), '#attributes' => array('class' => 'jscalendar'), '#jscalendar_ifFormat' => '%Y-%m-%d %H:%M', '#jscalendar_showsTime' => 'true',
);
$form['txtChkOut'] = array( '#title' => t('Check-Out'), '#type' => 'textfield', '#description' => t(''), '#attributes' => array('class' => 'jscalendar'), '#jscalendar_ifFormat' => '%Y-%m-%d %H:%M', '#jscalendar_showsTime' => 'true', );
$form['guest'] = array( '#type' => 'select', '#title' => t('Guests'), '#options' => array( 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', ), '#default_value' => '1', '#description' => t(''), '#required' => TRUE );
$form['rooms'] = array( '#type' => 'select', '#title' => t('Rooms'), '#options' => array( 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', ), '#default_value' => '1', '#description' => t(''), '#required' => TRUE );
$form['submit'] = array( '#type' => 'submit', '#value' => t('submit') ); return $form;