Gossamer Forum
Home : Products : Gossamer Links : Discussions :

If...then based on length?

Quote Reply
If...then based on length?
Is it possible to have a <%if len(field_name)>4%>do this<%else%>Do that<%endif%> sort of statement on a template? If so, what is the correct syntax?

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: May 15, 2011, 9:53 AM
Quote Reply
Re: [carfac] If...then based on length? In reply to
I fopund it- thanks!

Primary phone number: <%phone.0%> <%if phone.length > 1%>Secondary numbers: <%loop phone%><%unless first%><%loop_value%> <%endunless%><%endloop%>
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] If...then based on length? In reply to
Nope- that does not work... that is for a loop...
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] If...then based on length? In reply to
Code:
<%if length $field_name > 4%>
...
<%else%>
...
<%endif%>

Adrian
Quote Reply
Re: [brewt] If...then based on length? In reply to
Thanks Adrian!
dave

Big Cartoon DataBase
Big Comic Book DataBase