Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

How to set session based form with the smarty variables?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
toplisek
Smarty Regular


Joined: 17 Sep 2009
Posts: 48

PostPosted: Sat Jul 06, 2013 3:49 pm    Post subject: How to set session based form with the smarty variables? Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Jul 06, 2013 4:54 pm    Post subject: Reply with quote

It's not possible to modify the session from tamplate code.
Back to top
View user's profile Send private message
toplisek
Smarty Regular


Joined: 17 Sep 2009
Posts: 48

PostPosted: Fri Jan 31, 2014 10:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP