• Resolved Eduardo Cheis

    (@eduardocheis)


    This:
    Data: {@pessoas_com_quem_se_relaciona.data_do_baptismo}

    Returns:
    Data: 01/01/1911

    This:
    {@pessoas_com_quem_se_relaciona.tipo_de_registo_de_nascimento}<br>
    [if pessoas_com_quem_se_relaciona.tipo_de_registo_de_nascimento="Baptismo"]
    Data: {@pessoas_com_quem_se_relaciona.data_do_baptismo}
    [/if]

    Returns:
    Baptismo
    Data:

    Why is the value for ‘pessoas_com_quem_se_relaciona.data_do_baptismo’ not returned when inside an if statement?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Eduardo Cheis

    (@eduardocheis)

    After many attempts and just about to give up I found out how to do it! 😛

    Just changed this:
    [if pessoas_com_quem_se_relaciona.tipo_de_registo_de_nascimento=”Baptismo”]
    Data: {@pessoas_com_quem_se_relaciona.data_do_baptismo}
    [/if]

    to this:
    [if pessoas_com_quem_se_relaciona.tipo_de_registo_de_nascimento=”Baptismo”]
    Data: {@data_do_baptismo}
    [/if]

    and it worked! (nevertheless if someone knows why this works I would love to hear about it)

    Plugin Support pdclark

    (@pdclark)

    The old and new version look the same to me, but following the examples on https://docs.pods.io/displaying-pods/template-tags/if-conditional-tag/, any of these formats should be valid for the if statement:

    [if field="my_field_name" value="5"]
    [if field="my_field_name" value="5" compare="="]
    [if my_field_name="5"]

    One critical item to be aware of is the difference between " — a logical/straight quotation mark, versus and other curly quotes and apostrophes, which are typographical marks not valid in computer languages.

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

The topic ‘If Else not showing values for fields’ is closed to new replies.