Elementor - it would be great if you'd update this to work with the new version. That or take this down - it's a bit frustrating to put work in only to have it not work, and then having to go to the youtube comments to get validation of that. I can't imagine there isn't a solution in the new Elementor so help us out!!!
Hey Carol, I am trying to implement this, however my failed popup doesn't show despite putting the shortcode ID. Was there anything special you had to do to get this to work?
It doesn't seem to be triggering the denial pop-up and I can't find any differences in what was done with the video. I did the last one with the birthdate. Any suggestions for troubleshooting?
@@simonjcarter007 Hi Simon, i havent gotten it to work completely, however I found that changing the < and > to the brackets it is functional. The denied popup still does not display unfortunately however the popup wont close. Did you get any assistance from support?
@@DAAN_MUSIC Yeah they advised me not to use it lol! It was built using an old framework apparently. I've just used the tick to accept you're over 18 for now. Client ok with it but not tthe ideal solution
@@DAAN_MUSIC @Simon Carter You can rectify this by changing "if(age < 18 || age > Infinity)" to "if(age < 18)". If your country has a different age requirement, just change 18 manually.
I have a problem, the cookie plugin show together this popup... and if I click on Reject cookies or Allow cookies, the popup page will be closed automatically... and this is not a good job, how can i solve this? thank you.... other that, another problem is: the popup show 0.2 second after the home page has already load, this eliminates the surprise effect
They can actually inspect element and delete the pop up section to view the content. If there is any work around for it, it would be highly appreciated.
Yeah, I'm having difficulties getting this to work despite following the tutorial. Was wondering if it was my cookies/GDPR compliance plugin causing a conflict, but doesn't seem to work even with that plugin disabled...
@@simonjcarter007 You can rectify this by changing "if(age < 18 || age > Infinity)" to "if(age < 18)". If your country has a different age requirement, just change 18 manually.
A fixed script for anyone needing it. Also actually checks the users month and day they were born, not just the year. Just change your access denied id: function dateDiffInYears (oldDate, newDate) { let oldY = oldDate.getFullYear(); let oldM = oldDate.getMonth(); let oldD = oldDate.getDate(); let newY = newDate.getFullYear(); let newM = newDate.getMonth(); let newD = newDate.getDate(); var diff = newY - oldY; if (oldM > newM) { diff--; } else { if (oldM == newM) { if (oldD > newD) { diff--; } } } return diff; } document.getElementById ("dateofbirthsubmit").addEventListener ('click', function (event) { var dateString = document.getElementById('form-field-dateofbirth').value; if (dateString !=='') { let today = new Date(); let birthDate = new Date (dateString + 'T00:00:00.000'); let age = dateDiffInYears (birthDate, today); if (age < 18 || age > Infinity) { elementorProFrontend.modules.popup.showPopup ({id:50}, event); // Change the id to the Access Denied Id event.preventDefault(); } } else { alert ("You must provide your date of birth!"); } });