Gossamer Forum
Quote Reply
HELP!!!
Hi,

I'm using the Templates version of Links 2.
I've got a "Yes/No" field in the add form.
I would like to have a text written for Yes and an other for No.
For exemple:

"Yes/No" option for the field "Download":
You chose Yes: the text is: "Program ready for download!"
You chose No: the text is: "Program not ready!"

I think it should be somthing like this:

<%if isDownload%>
Program ready for download!
<%else%>
Program not ready!
<%endif%>

Thanks a lot for your help...

Toinbo
Quote Reply
Re: HELP!!! In reply to
Try the following:

Code:
<%if isDownload eq 'Yes'%>
Program ready for download!
<%endif%>
<%if isDownload eq 'No'%>
Program not ready!
<%endif%>

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: HELP!!! In reply to
you need the enhanced template.pm mod to do that..

otherwise in the sub put

($rec{'Field'} eq "Yes") or undef $rec{'Field'};

and then you can say if Field in the templates..

jerry
Quote Reply
Re: HELP!!! In reply to
Hi,

Thank you for your help...

It works perfectly!!!

Thank you again...