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 assign a value of Input text to a smarty variable

 
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
vkrox
Smarty Rookie


Joined: 12 Jul 2018
Posts: 5

PostPosted: Thu Jul 12, 2018 5:18 pm    Post subject: How to assign a value of Input text to a smarty variable Reply with quote

Hello all,

I have a textbox in html with a value passed by a javascript as below

Code:
<input type="hidden" id="chids" name="chids" />


Code:
<script>document.getElementById("chids").value = chId;</script>


I want to know how to get that text box value to a smarty variable value with assign keyword as,

Code:
{assign var="ids" value=}


Thanks.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Jul 13, 2018 10:59 am    Post subject: Reply with quote

Please shoose one, either Smarty or JS.
They never meet. When JS starts, Smarty (PHP) is long since dead and gone.
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