I use a contactformular in my magento shop https://agoshop.at/kontakt
The problem is that I will get very day up to 4 an more dummy contact informations. I think I will need there a captcha in this form to check if the user is a human.
I will check my backend and find a site contact with the following content:
<p><strong>{{block class="MagentoContactBlockContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}</strong></p>
I find a form.phtml file in the folder vendormagentomodule-contactviewfrontendtemplates
with the following content:
/** @var MagentoContactBlockContactForm $block */
?>
escapeUrl($block->getFormAction()) ?>"
id="contact-form"
method="post"
data-hasrequired="escapeHtmlAttr(__('* Required Fields')) ?>"
data-mage-init='{"validation":{}}'>
escapeHtml(__('Write Us')) ?>
escapeHtml(__('Jot us a note and we’ll get back to you as quickly as possible.')) ?>
escapeHtml(__('Name')) ?>
escapeHtmlAttr(__('Name')) ?>" value="escapeHtmlAttr($this->helper(MagentoContactHelperData::class)->getPostValue('name') ?: $this->helper(MagentoContactHelperData::class)->getUserName()) ?>" class="input-text" type="text" data-validate="{required:true}"/>
escapeHtml(__('Email')) ?>
escapeHtmlAttr(__('Email')) ?>" value="escapeHtmlAttr($this->helper(MagentoContactHelperData::class)->getPostValue('email') ?: $this->helper(MagentoContactHelperData::class)->getUserEmail()) ?>" class="input-text" type="email" data-validate="{required:true, 'validate-email':true}"/>
escapeHtml(__('Phone Number')) ?>
escapeHtmlAttr(__('Phone Number')) ?>" value="escapeHtmlAttr($this->helper(MagentoContactHelperData::class)->getPostValue('telephone')) ?>" class="input-text" type="text" />
escapeHtml(__('Wie können wir Ihnen behilflich sein?')) ?>
escapeHtmlAttr(__('What’s on your mind?')) ?>" class="input-text" cols="5" rows="3" data-validate="{required:true}">escapeHtml($this->helper(MagentoContactHelperData::class)->getPostValue('comment')) ?>
getChildHtml('form.additional.info') ?>
escapeHtmlAttr(__('Submit')) ?>" class="action submit primary">
escapeHtml(__('Submit')) ?>
So I think this is the correct file but how can I add a captcha?
Hope someone can help me there.
kindly regards