• Resolved timb111

    (@timb111)


    I want to show or hide information on the event page based on a custom event checkbox field. When I test if the checkbox is ticked then it seems to work
    [eme_if tag='#ESC_FIELD{MY_CUSTOM_CHECKBOX_FIELD}' value='y']Show me[/eme_if]

    But when I test if the checkbox is unticked then it doesn’t work
    [eme_if tag='#ESC_FIELD{MY_CUSTOM_CHECKBOX_FIELD}' value='n']Show me[/eme_if]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Franky

    (@liedekef)

    A checkbox that is unticked is not transmitted via form submit. So best is to check if the value is empty or not:

    [eme_if tag='#ESC_FIELD{MY_CUSTOM_CHECKBOX_FIELD}']Show me[/eme_if]
    [eme_if tag='#ESC_FIELD{MY_CUSTOM_CHECKBOX_FIELD}' is_empty=1]Show me if not checked[/eme_if]
    Thread Starter timb111

    (@timb111)

    Thank you, it works when using “is_empty=1”.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Conditional with custom checkbox field’ is closed to new replies.