Page 1 of 1

How to send form data when validation is executed?

Posted: Thu May 12, 2011 7:04 am
by toplisek
I have form name form1 and like to send message per this form. How to do this in PHP file (related to this tpl).

I'm using validation jQuery plugin 1.7.

http://bassistance.de/jquery-plugins/jq ... alidation/


{if $smarty.request.action == "form1"}

{nocache}
{literal}
<script type="text/javascript">
document.location='replyfile';
</script>
{/literal}
{/nocache}
{/if}

Re: How to send form data when validation is executed?

Posted: Mon May 16, 2011 12:18 pm
by Jade
You need to use ajax and post the data to the other file. Look at the jquery .post documentation.

Re: How to send form data when validation is executed?

Posted: Thu May 19, 2011 3:39 am
by toplisek
This assign is to set form display.

I like to know how to set values from inputs into message (mail script).

I have the following:
<p>
<label class="input1">Familiy name</label>
<input id="text1" name="{$varname}" size="60" maxlength="60" class="required" />
</p>

and assigned:
$smarty->assign('varname', $_POST['varname']);

Re: How to send form data when validation is executed?

Posted: Thu May 19, 2011 12:50 pm
by Jade
I don't know much about smarty but I suggest you take a look at the manual: http://www.smarty.net/docsv2/en/api.assign.tpl