|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
toplisek Smarty Regular
Joined: 17 Sep 2009 Posts: 48
|
Posted: Sat Jul 06, 2013 3:49 pm Post subject: How to set session based form with the smarty variables? |
|
|
I have redirection of forms like:
{if $smarty.request.action == "contact_form"}
{nocache}
{literal}
REDIRECT TO THANK YOU PAGE using Javascript
{/literal}
{/nocache}
{/if}
How to UNSET session in this example as RELOAD in browser sends forms as session is still active? Possible to be solved with Smarty without PHP code? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Jul 06, 2013 4:54 pm Post subject: |
|
|
It's not possible to modify the session from tamplate code. |
|
Back to top |
|
toplisek Smarty Regular
Joined: 17 Sep 2009 Posts: 48
|
Posted: Fri Jan 31, 2014 10:31 am Post subject: |
|
|
Is there possible to receive example how to set smarty based form and not to use sessions?
Validation can be sample...
I have set if sentence when form is validate like:
{if $smarty.request.action == "form1"}
{nocache}
{literal}
<script type="text/javascript">
document.location='replyfile';
</script>
{/literal}
{/nocache}
{/if}
1. How to retrieve values with Smarty as fields have value in name='' ...'' as now it does not capture value in form.
2. How to send form ONLY when all fields are validated?
I have currently:
{if $smarty.request.action == "form1"}
and send button like:
<input type="submit" name="form" value="Send my messages" class="mybutton" />
How to send after validation is performed?
3. This should mean sending form when name="form1" is clicked. Is it if sentence correct set with name form1?
Application is:
[bassistance.de...]
Version 1.7.
Now is sending when I click on button but it should send values and after validation is made. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|