Support » Plugin: Dynamic Conditions » missing value

  • Resolved dasigna

    (@dasigna)


    hi there,

    having set up an acf date-picker field for cpt and trying to compare this to the current date.
    in detail: the post should be hidden as soon as the (future) date of the acf field is reached.
    basically thats no problem – BUT: i do not get any other value for the acf field than ‘0’ …
    tried every which way but this value is missing every time.

    am i missing something, or is it a bug??

    ==========================================
    debug:
    Element: section-79768fe (section)
    DynamicTag-Tag: acf-text
    DynamicTag-Key: field_5dfa10135f8ce:end_date
    DynamicTag-Value: 0 <———————————————!!??
    Check-Value: 1576697955
    Check-Value2: 0
    Condition-Type: strtotime
    Condition: Hide if less
    Condition met: yes
    ==========================================
    if there were any correct value, the condition wouldnt be met …

    totally confused, thanks for help in advance.

    • This topic was modified 1 year, 11 months ago by dasigna.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author rtowebsites

    (@rtowebsites)

    Did you checked it outside the Elementor preview? The Elementor preview is buggy with custom fields. Try the WordPress Preview instead or check at the final page. Inside the Elementor preview we got “DynamicTag-Value: 0” too.

    Outside it looks like:

    Element:section-13671fd (section)
    DynamicTag-Tag:acf-text
    DynamicTag-Key:field_5dfb3c7f757a7:date
    DynamicTag-Value:1576800000
    Check-Value:1576746303
    Check-Value2:0
    Condition-Type:strtotime
    Condition:Hide if less
    Condition met:no

    Dynamic-Tag -> ACF Field (date)
    Show/Hide -> as you want
    Condition -> Less than
    Compare Type -> String to time
    Conditional value -> now

    The custom field settings:

    Field Type -> Date Picker
    Return Format -> d/m/Y

    Thread Starter dasigna

    (@dasigna)

    hi there,

    yeah – i did check everything regarding preview(s).
    inside elementor the dynamic condition doesnt respond at all. wp preview or even the final site always show the value “0”.

    this is regardless what return format in acf field is set – i had them all.

    i suspect this is eighter related to the return date format from acf or given to the fact that there are more than one post in elementor post widget with different end dates (one before and one after ‘now’) even if only one is pulled to display?

    interestingly, if i choose post date as initial tag it works and i am given a second field to choose the date format in elementor dynamic tag settings. the latter is not the case for acf-field.

    all settings choosen as proposed …
    running out of ideas.

    • This reply was modified 1 year, 11 months ago by dasigna.
    Plugin Author rtowebsites

    (@rtowebsites)

    Hello @dasigna,

    can u tell us your setup inside the elementor? Do you try to use the posts widget and filter them with the dynamic conditions? If yes, this will not work, because the dynamic tag will try to get the custom field from the post where the widget is.

    Maybe you can give us access to investigate that further for you?

    Thread Starter dasigna

    (@dasigna)

    hmmm…
    might be the issue with the choosen setup. seems to be i am thinking wrong way …

    the task is to have a shortmessage shown that disappears once the given date is reached.
    for that a cpt is set up with two fields – the message itself and the end date.

    setup in elementor currently is a section with the posts widget (!?) to display only the latest shortmessage. the section is set to disappear as soon as the current date is greater than the end date of the message. in this case end date is smaller than current date.

    if this wont work i am currently stuck in loss of imagination how to set it up another way 🙂

    Plugin Author rtowebsites

    (@rtowebsites)

    If we understand you right, that is not possible. The source of the dynamic tag is always the current post. You will need an extra dynamic tag, that provide you the newest date from all posts in the given category or something like that.

    We will try to find a solution in the new year, as we think its a cool idea and tricky issue. But we think right now, the right way should be to create a custom dynamic tag for the functionality.

    Thread Starter dasigna

    (@dasigna)

    thanks so far. and yes, its a tricky one.

    i might have found a workaround in theory, but actually not able to test it, as actual elementor updates have some errors that prevent this testing… sadly.
    coming back if the test was possible and successful.

    anyway – i have to find a solution .)

    Plugin Author rtowebsites

    (@rtowebsites)

    We hope you found a solution! We close this issue. Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘missing value’ is closed to new replies.