Re: [SMARTY] little tipps for Smarty using PEAR Quickform

From: Date: Fri, 25 Feb 2005 19:52:34 +0000
Subject: Re: [SMARTY] little tipps for Smarty using PEAR Quickform
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12265@lists.php.net to get a copy of this message
Patrick, I use this combo and have too found it to be somewhat frustrating at times. However... On Fri, 25 Feb 2005 15:39:41 +0100, Patrick Fehr <fehrp@ee.ethz.ch> wrote: > So for display if or if not, make the following: > {if ($form_data.username.html|trim|truncate:6:"" != "&nbsp;")} > {$form_data.username.html} > {else} > no username given > {/if} > > you can't just do {if ($form_data.username.html)} because the html is > generated ALWAYS, even if the user doesn't fill in anything. Why would you not simply test $smarty.post.username ? -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy.

« previous php.smarty.general (#12265) next »