• Resolved workvista

    (@workvista)


    Hi,

    I am using the following template :

    [if last_date_of_application] <p><strong>Last Date of Application</strong>: {@last_date_of_application}</p> [/if]

    last_date_of_application is date time custom field. The above template always displays empty string after “Last Date of Application :”

    How should I hide a empty date time field.

    Thanks .

    https://wordpress.org/plugins/pods/

Viewing 1 replies (of 1 total)
  • Plugin Author Jim True

    (@jimtrue)

    That is correct, because empty date entries are 1900-01-01′. We have an bug report/enhancement request to provide more complicated options to the [if] template tag system, but we don’t have a simple one to check for non-null, but default dates as ’empty’ dates for custom date fields (these work perfectly fine with the WP Object date fields, like post_date).

    As a workaround, you can write your own function to check for the ‘default’ value and return the string you’re wanting to show instead. That would work like this:

    {@last_date_of_application,output_date_of_application} where the output_date_of_application is your custom function to either output the information inbetween the IF or return nothing if it’s a default string.

    This is explained under the section ‘Using Functions on Field Ouput’ on this doc page:
    http://pods.io/docs/build/using-magic-tags/

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional tags don't work for date / time field’ is closed to new replies.