<p>ok. thanks. i appologize for the misuse of the list.</p>
<div class="gmail_quote">On Jul 31, 2011 7:28 PM, "Earnie Boyd" <<a href="mailto:earnie@users.sourceforge.net">earnie@users.sourceforge.net</a>> wrote:<br type="attribution">> This is OT for this list. This list is reserved for discussions of<br>
> Drupal core development. Please move your query to <a href="mailto:support@drupal.org">support@drupal.org</a><br>> and see <a href="http://drupal.org/support">http://drupal.org/support</a> and <a href="http://drupal.org/community">http://drupal.org/community</a> for<br>
> more options.<br>> <br>> Idan Arbel wrote:<br>>> <br>>> <br>>> <br>>> <br>>> Hello,<br>>> <br>>> <br>>> <br>>> I'm trying to get a webform to send the data via ajax on drpual 7.<br>
>> <br>>> <br>>> <br>>> I've added this code into my template.php file. It seems to work well except<br>>> for the fact that the data isn't saved at the end.<br>>> <br>>> What am I missing?<br>
>> <br>>> <br>>> <br>>> function enjoon_form_alter(&$form, &$form_state, $form_id) {<br>>> if($form_id == 'webform_client_form_32'){<br>>> $form['actions']['submit'] = array(<br>
>> '#type' => 'submit',<br>>> '#ajax' => array(<br>>> 'callback' => 'enjoon_ajax_callback',<br>>> 'wrapper' => str_replace('_','-',$form['#form_id']),<br>
>> 'effect' => 'fade',<br>>> ),<br>>> '#value' => t('Submit'),<br>>> );<br>>> }<br>>> }<br>>> <br>>> function enjoon_ajax_callback($form, $form_state) {<br>
>> <br>>> if(form_get_errors()){<br>>> return $form;<br>>> }<br>>> else{<br>>> return 'Thank you!';<br>>> }<br>>> }<br>>> <br>>> <br>>> <br>>> <br>
>> <br>>> Thanks<br>>> <br>>> <br>>> <br>>> Idan<br>>> <br>>> <br>> <br>> <br>> -- <br>> Earnie<br>> -- <a href="http://progw.com">http://progw.com</a><br>> -- <a href="http://www.for-my-kids.com">http://www.for-my-kids.com</a><br>
</div>