
-
AuthorPosts
-
June 9, 2021 at 12:05 am #1304753
Google reCaptcha is blocked by the theme options only if used it in the standard contact form.
To make the pages GDPR compliant, I prefer to use the Contact Form 7, which it is possible to integrate the reCaptca ver. 2.0 / 3.0, but obviously it is not blocked by the theme.
I created two different contact forms with Contact Form 7: one has the reCAPTCHA and the other does not.
On the contact page, I would like to use HTML or PHP code to create an IF option that allows one or the other module to be loaded. It should be based on the existence of the “aviaPrivacyGoogleReCaptchaDisabled” cookie and its value.
What is the best solution? Use the block code?
And what HTML / PHP code should I put in it?June 11, 2021 at 8:46 am #1305218Good morning guys.
This is the first time I have done a support request and probably something is wrong because I am not receiving any response.
Is there an alternative way to get support?
Did I do something wrong in opening the topic?
Do I have to post the request in a specific area?
Thank you.June 11, 2021 at 5:49 pm #1305313Hi,
Thanks for contacting us and sorry for the late reply!
Could you please try adding it as custom cookie – https://kriesi.at/documentation/enfold/privacy-cookies/#additional-custom-cookies and check if that helps?
If you are using Borlabs Cookie plugin, it offers conditional load and you can find the solution here – https://kriesi.at/support/topic/kontaktformular-7/#post-1290606. If you are not, I am going to need to check with my teammates and devs as I do not think that would be easily possible.
Best regards,
YigitJune 11, 2021 at 8:38 pm #1305321Hi Yigit and thanks for the reply.
I probably mis-explained the problem.
Once you have created a new form with Contact Form 7, you can recall it with a shortode (for example [contact-form-7 id = “547” title = “Form”]).
In this way, for example, it’s possible to use the Code Block tool within the Contacts page.
I just want to know where and how to insert an IF / ELSE / ENDIF condition that calls two different forms (for example [contact-form-7 id = “547” title = “Form”] when IF is true or [contact-form-7 id = “548” title = “Form2”] when IF is false).
The IF condition simply checks the value of the “aviaPrivacyGoogleReCaptchaDisabled” cookie already created by the ENFOLD theme. I don’t currently need to create a new cookie.June 15, 2021 at 8:25 am #1305734Hi,
Thank you for the info.
You may need to create a custom shortcode that selects and renders a contact form shortcode based on certain conditions. Please check the following documentation for more info about the shortcode API.
// https://codex.wordpress.org/Shortcode_API
Best regards,
IsmaelJune 21, 2021 at 10:26 pm #1306826Thanks for your reply Ismael.
I’ve seen your suggestion, but I was hoping for something more precise, efficient and simple.
However i solved it today another way, using a plugin.
I hope in future events to have more concrete answers.
After all I was just asking for a few lines of code
RegardsJune 22, 2021 at 10:32 pm #1307040Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Contact Form 7 and HTML / PHP code’ is closed to new replies.