Conditional Text depending on a field empty or not

2,854 views
Skip to first unread message

John Curry

unread,
Dec 17, 2014, 1:34:10 AM12/17/14
to anki-a...@googlegroups.com
Is there a facility analogous to an isempty() type function in anki

I have a card like this: 
(I have deleted all the styling for clarity)



==================================
Front Template

{{Hanzi}}



Back Template

{{FrontSide}}


<hr id=answer>


{{Pinyin}}

Meaning: {{English}}


==================================


So for learning Chinese, I might be presented on the Front card


with an answer of 

zài

Meaning: (located) at/in/exist 


However if the field "English" is empty (i.e. no data), I wish to be presented like this 


with an answer of 

zài


that is, the back template is dependent of whether a field (here "English" is populated or not. For this example it is not that important, but in reality I have many fields.



Any suggestions?





Tim

unread,
Dec 17, 2014, 1:40:28 AM12/17/14
to anki-a...@googlegroups.com

John Curry

unread,
Dec 17, 2014, 1:42:00 AM12/17/14
to anki-a...@googlegroups.com
great thanks Tim!
Reply all
Reply to author
Forward
0 new messages