21 May
2002
21 May
'02
12:04 p.m.
hello, i have an input tag, and i want to set the value attribute to either a defined value or a blank string. my python expression either returns a single instance or an empty list. right now, i am using two Input tags in tandem. Only one remains after rendering b/c one is removed. my question, is it possible to write this so i don't have to have nearly identical Input tags all over my page? thanks, mark <input type="text" name="input_name" tal:condition="task/task_name | nothing" tal:attributes="value task/task_name" /> <input type="text" name="input_name" tal:condition="not:exists:task/task_name" tal:attributes="value string:hi" />