| Patrick Fehr 2005-02-25, 4:02 pm |
| Hi there
after long hours of $#*&% and the same, I think, I should share my thoughts:
Let's say your QuickForm is a guestbook where not every field is required
and you use the Renderer_Array_Smarty for the data.
The main problem with output afterwards is, that these fields are
then .label or .html
Eg: optional username.html and in unfrozen stage that is the input field
and in frozen stage it's NOT just the string of input, no it's a hidden
inputfield.
So for display if or if not, make the following:
{if ($form_data.username.html|trim|truncate:6:"" != " ")}
{$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.
So much for that
cu guys
hope this helps 1 in a million :)
--
Patrick Fehr
Swiss Federal Institute Of Technology
|