Categories > TinyButStrong general >

Problems with conditional

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Marcelo
Date: 2007-06-13
Time: 23:06

Problems with conditional

I have a form, and I wanna put a conditional into the value's atribute of a textbox, but I'm doing something wrong:
<input type="text" name="p6010" id="p6010" value="[data.a01 ;if [val]='0000-00-00';then ''; else [data.a01];]" />

I want to exibit an empty space if that value(data.a01) be equal to '0000-00-00', else it exibits its value.

Can somebody help me?
By: Skrol29
Date: 2007-06-16
Time: 00:14

Re: Problems with conditional

Hi,

The following should be ok:
[data.a01 ;if [val]='0000-00-00';then '']
Or
[data.a01 ;if [val]='0000-00-00';then ''; else [val]]
By: Marcelo
Date: 2007-06-18
Time: 20:27

Re: Problems with conditional

Thanks, it worked!  =D