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

Problems with append/assign

 
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
rhett
Smarty n00b


Joined: 31 Aug 2004
Posts: 2

PostPosted: Tue Aug 31, 2004 1:10 pm    Post subject: Problems with append/assign Reply with quote

Hi,

{validate form="register" field="nickname" criteria="notEmpty" append="errors" message="Nick Name cannot be empty"}
{validate form="register" field="email" criteria="isEmail" append="errors" message="Must enter a valid email address"}
{validate form="register" field="email" criteria="isNotDuplicateEmail" append="errors" message="Email address is already registered"}
{validate form="register" field="password" criteria="notEmpty" append="errors" message="Must enter a password"}

I have a bunch of validate criteria near the top of my template... if i dont assign or append the data it prints the error messages fine although as soon as i do an assign or append it doesnt seem to get the errors:

I am trying to access them like:

{if !empty($errors)}
its not empty
{else}
its empty
{/if}

{section name=error loop=$errors}
error: {$errors[error]}<br>
{sectionelse}
there are no values in $errors.
{/section}

always getting the no values or empty response... sorry if this is a stupid question i cant seem to see what i have done wrong i have looked through the docs

thanks,
rhett


Last edited by rhett on Wed May 05, 2010 11:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Tue Aug 31, 2004 2:10 pm    Post subject: Reply with quote

Can you post a working sample of PHP code and template that exhibits the problem?
Back to top
View user's profile Send private message Visit poster's website
rhett
Smarty n00b


Joined: 31 Aug 2004
Posts: 2

PostPosted: Tue Aug 31, 2004 2:15 pm    Post subject: Reply with quote

just as i was going to copy/paste the code i loaded the page again and its working... must be a cache thing... sorry!
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