2011-05-13 4 views
1

날짜 위젯이 비어 있는지 확인하려고했습니다. 비어 있으면 표시되지 않습니다./위젯의 특정 값을날짜 위젯이 비어 있는지 확인하는 방법?

<div class="field" 
tal:define="value  widget/value; 
      label  widget/label" 
tal:condition="python:widget.__name__ not in ('IBasic.title', 'IBasic.description', 
    'title', 'description',) and value"> 
... 
</div> 

테스트 :

python:value not in (None, '',) 
+0

"날짜를 확인할 수 없음"이란 무엇을 의미합니까? 귀하의 경우 '가치'란 무엇입니까? –

답변

0

왜 뭔가 같은 :

<div class="field" 
    tal:define="value widget/value; 
       valueexists python:value not in (None, '',); 
       label widget/label" 
    tal:condition="python:widget.__name__ not in ('IBasic.title', 'IBasic.description', 'title', 'description',) and valueexists"> 

문제는 아래의 식을 날짜를 확인할 수하지 않는 것입니다 가치가 문제를 일으킬 운명 인 것 같습니다.

0

정확하게 질문을 이해하고 있는지 잘 모르겠지만 jQuery가 위젯을 확인하고 조건부로 숨기 (제거)하는 방법으로 제안하고 싶습니다.

관련 문제