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

SmartyValidate - Message

 
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 -> Add-ons
View previous topic :: View next topic  
Author Message
joannem
Smarty Rookie


Joined: 11 Oct 2012
Posts: 6

PostPosted: Wed Oct 17, 2012 4:57 pm    Post subject: SmartyValidate - Message Reply with quote

I have set up my php programs to use SmartyValidate which works perfect.

My only question at this point is..... I also you a PEAR translation pkg so I would like to be able to have the Message in the SmartyValidate use a variable which contains the translated value.

for example if the following field {$tr_UserNmLbl} contains my translated message, how do I get that to work with

{validate id="vuname" message="** Users Name must contain a value **" }

I've tried
{validate id="vuname" message="{$tr_UserNmLbl}" } but that doesn't work for me.... any suggestions?

Thanks in advance!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Oct 17, 2012 5:55 pm    Post subject: Reply with quote

try:

{validate id="vuname" message=$tr_UserNmLbl}
Back to top
View user's profile Send private message Visit poster's website
joannem
Smarty Rookie


Joined: 11 Oct 2012
Posts: 6

PostPosted: Wed Oct 17, 2012 7:11 pm    Post subject: Reply with quote

Thanks for the suggestion, I tried both

{validate id="vuname" message=$tr_UserNmLbl}

and

{validate id="vuname" message="$tr_UserNmLbl"}

Neither gives me an error but I get no message either.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Oct 17, 2012 7:13 pm    Post subject: Reply with quote

does {$tr_UserNmLbl} have a value?
Back to top
View user's profile Send private message Visit poster's website
joannem
Smarty Rookie


Joined: 11 Oct 2012
Posts: 6

PostPosted: Wed Oct 17, 2012 7:16 pm    Post subject: Reply with quote

No actually it does not have a value..... was suposed to type $tr_UserNmLbl not $tr_UserNmVal.

It works perfectly as you suggested.

Thank you so much for your help!!
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 -> Add-ons 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