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