• Resolved leodiensis

    (@leodiensis)


    Hi,

    I have an issue with the visibility condition based on date.

    My goal is to show a text if the date indicated in one field is older than 10 days.

    1. So I created a date field.
    2. Then I created a HTML field
    3. As visibility condition to the HTML field, I chose “Show if date is older than 10 days from now”.
    4. If I make a preview (or publish) and choose a date older than 10 days, the HTML text does not display ??

    Other conditions work fine, but this one concerning dates does not…

    Any idea?

    Thanks for your help!

    Here is the code:
    {"type":"form","data":{"fields":[{"id":"date-1","element_id":"date-1","form_id":"wrapper-465-109","type":"date","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-465-109","field_type":"picker","date_format":"dd/mm/yy","default_date":"none","field_label":"Date","placeholder":"Choisissez une date","icon":"true","day_label":"Jour","day_placeholder":"E.g. 01","month_label":"Mois","month_placeholder":"E.g. 01","year_label":"Année","year_placeholder":"E.g. 2000","restrict_message":"Veuillez sélectionner l’une des dates disponibles."},{"id":"html-1","element_id":"html-1","form_id":"wrapper-638-2598","type":"html","options":[],"cols":12,"conditions":[{"element_id":"date-1","rule":"is_before_n_or_more_days","value":"10"}],"wrapper_id":"wrapper-638-2598","field_label":"date > 10 j","variations":"<p> </p>\n<div id=\"ConnectiveDocSignExtentionInstalled\" data-extension-version=\"1.0.4\"> </div>"}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav"},"formName":"Test simple date","version":"1.14.11","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","validation":"on_submit","form-style":"default","enable-ajax":"true","autoclose":"true","submission-indicator":"show","indicator-label":"Soumission en cours…","form-type":"default","submission-behaviour":"behaviour-thankyou","thankyou-message":"Merci de nous avoir contacté, nous reviendrons vers vous sous peu.","submitData":{"custom-submit-text":"Envoyer le message","custom-invalid-form-message":"Erreur : votre formulaire n’est pas valide, veuillez corriger les erreurs !"},"validation-inline":"1","form-expire":"no_expire","form-padding-top":"0","form-padding-right":"0","form-padding-bottom":"0","form-padding-left":"0","form-border-width":"0","form-border-radius":"0","cform-label-font-family":"Roboto","cform-label-custom-family":"","cform-label-font-size":"12","cform-label-font-weight":"bold","cform-title-font-family":"Roboto","cform-title-custom-family":"","cform-title-font-size":"45","cform-title-font-weight":"normal","cform-title-text-align":"left","cform-subtitle-font-family":"Roboto","cform-subtitle-custom-font":"","cform-subtitle-font-size":"18","cform-subtitle-font-weight":"normal","cform-subtitle-text-align":"left","cform-input-font-family":"Roboto","cform-input-custom-font":"","cform-input-font-size":"16","cform-input-font-weight":"normal","cform-radio-font-family":"Roboto","cform-radio-custom-font":"","cform-radio-font-size":"14","cform-radio-font-weight":"normal","cform-select-font-family":"Roboto","cform-select-custom-family":"","cform-select-font-size":"16","cform-select-font-weight":"normal","cform-multiselect-font-family":"Roboto","cform-multiselect-custom-font":"","cform-multiselect-font-size":"16","cform-multiselect-font-weight":"normal","cform-dropdown-font-family":"Roboto","cform-dropdown-custom-font":"","cform-dropdown-font-size":"16","cform-dropdown-font-weight":"normal","cform-calendar-font-family":"Roboto","cform-calendar-custom-font":"","cform-calendar-font-size":"13","cform-calendar-font-weight":"normal","cform-button-font-family":"Roboto","cform-button-custom-font":"","cform-button-font-size":"14","cform-button-font-weight":"500","cform-timeline-font-family":"Roboto","cform-timeline-custom-font":"","cform-timeline-font-size":"12","cform-timeline-font-weight":"normal","cform-pagination-font-family":"","cform-pagination-custom-font":"","cform-pagination-font-size":"16","cform-pagination-font-weight":"normal","payment_require_ssl":"","submission-file":"delete","form_name":"Test simple date","form_status":"draft"},"client_id":null,"notifications":[{"slug":"notification-1234-4567","label":"Admin Email","email-recipients":"default","recipients":"XXXXXXXXXXXX","email-subject":"Nouvelle entrée de formulaire n°{submission_id} pour {form_name}","email-editor":"Vous avez une nouvelle soumission de formulaire : <br/> {all_fields} <br/>---<br/> Ce message a été envoyé depuis {site_url}.","email-attachment":"true"}]},"status":"draft","version":"1.14.11"}

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @leodiensis

    I hope you’re well today!

    I’ve imported the form to my test site and checked and it seems to be working fine. Take a look please:

    https://www.screencast.com/t/vfQqRfgJRhqD

    It’s Jun 10th today and if I select any date within last 10 days, HTML field doesn’t show but if I select any older date – it does show for me.

    But please note that condition is “before X days or older”. So if you set it to 10 days, the first “working” date will be 11 days back to the past, including “today” – not 10.

    If it’s not working this way for you – is the actual form the same as you shared or you have only shared some “example” form? And if so, is there any live page where I could see/check this issue “in action” on your site?

    Best regards,
    Adam

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @leodiensis ,

    We haven’t heard from you for over a week now, so it looks like you don’t have more questions for us.

    Please feel free to re-open this ticket if needed.

    kind regards,
    Kasia

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Visibility condition based on date not working’ is closed to new replies.