|
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 |
bluesapphire Smarty Rookie
Joined: 03 Feb 2006 Posts: 5
|
Posted: Thu Feb 03, 2011 7:23 am Post subject: Variable value in "default" |
|
|
I have following input field:
Code: |
<input type='text' id='username' class='textfield' value='{$username|default:$default_username_input_text}' />
|
The value of variable ($default_username_input_text) is coming from PHP.
My problem is that it is not showing value. Can some one guide me in this regards.
Iam using smarty 2.6
Thanks in advance |
|
Back to top |
|
Aristophan Smarty Regular
Joined: 10 Jan 2011 Posts: 96
|
Posted: Thu Feb 03, 2011 8:43 am Post subject: |
|
|
Normally this {$username|@default:$duit} is doing well, if the vars are assigned to smarty.
If the second isn't, assign it in the php file, where it comes from like this
$smarty->assign('duit', $default_username_input_text); |
|
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
|