• Hello Yannick,

    I’m having issues with the modal constantly displaying even though a cookie has been set.

    The use case would be a user would access this page:
    https://ppg-004.frankandvictor.com/cxo-toolkit/

    Enter their information and a cookie would be set for 365 days that would allow them to access the content on page.

    The problem I’m experiencing is that the modal still displays regardless of the cookie being set.

    Is there a way to ONLY display the modal if a cookie is not present for a user. Once the cookie is set the modal should no longer display for the user on a designated page for expire amount ie.. 365 days.

    https://www.ads-software.com/plugins/modal-dialog/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    I am not sure I understand the problem. I visited the page you mentioned and the pop-up appeared. I checked and saw that a cookie was set to a value of 1. Then I refreshed and the dialog did not appear. This seems to me like the modal is respecting the presence or absence of a plugin.

    Now, do you only want the dialog to stop appearing once someone has signed up for the form? If so, then you should configure the plugin so that you can set the cookie manually, and manage setting the cookie through your own code.

    Let me know if you have further questions and please consider donating to support this plugin’s development.

    Thread Starter kamgraphica

    (@kamgraphica)

    Hi Yannick,

    Thank you for the reply.

    The use case we are aiming for is to serve the Gated Content + Modal to the end user until they fill out the form.

    A cookie then would be set for XXX amount of days, weeks etc…

    Allowing the user to access the Gated content.

    At the moment the plugin allows you to display the modal for X times or Display after
    X views.

    Looks like the implementation we are looking for is a combo of both the contact form 7 submission and controlling the modal display via a cookie rather than forcing the modal to display after X views or display X times .

    Thoughts?

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Yes, you can achieve what you are looking for the following way:

    – Set the number of times to display to 1.
    – Check the box for the ‘Set display cookies manually’ option

    This will effectively display the dialog forever until you set the cookie yourself through your own javascript, since Modal Dialog will never set the cookie itself.

    Then, after the user has registered, you can call the following javascript to set the cookie:

    https://github.com/carhartl/jquery-cookie

    jQuery.cookie(‘name’, ‘value’, { expires: 365, path: ‘/’ });

    This code could be on the confirmation page for the registration or when the user clicks the register button.

    Let me know if this makes sense and if you have further questions on implementation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modal Cookie Contact Form 7’ is closed to new replies.