
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
hapi-recaptcha-html
Advanced tools
A lightweight plugin that integrates Alpine JS to enhance HAPI Forms with Google reCAPTCHA support and easy form submission handling.
<script src="https://unpkg.com/hapi-recaptcha-html@latest/dist/hapi.min.js" defer></script>
<script src="enquiry-forms.js" defer></script>
DataLayer Integration
This library automatically pushes a form_submission event to the global window.dataLayer when a form is successfully submitted.
The event payload includes all form field values under the property enhanced_conversion_data.
Example pushed object:
{
event: "form_submission",
enhanced_conversion_data: {
name: "John Doe",
email: "john@example.com"
// ...other fields
}
}
You do not need to add any extra integration code for DataLayer support; it works out of the box.
<script>
Hapi.forms([
// form 01
{
name: 'form01',
hapiformID: '<hapiform-id-number-1>',
redirectTo: '/contactus-success.html',
captchaId: 'captcha-01',
integrationScriptUrl: "", // optional, POST current DataForm to external URL (API).
recaptchaSize: "normal", // normal or compact
},
// form 02
{
name: 'form02',
hapiformID: '<hapiform-id-number-2>',
redirectTo: '/contactus-success.html',
captchaId: 'captcha-02',
integrationScriptUrl: "", // optional, POST current DataForm to external URL (API).
recaptchaSize: "normal", // normal or compact
}
...
]
);
</script>
please note that you must use $store.<form-name>.fields.<field-name> to bind inputs.
// in form01
<input id="form01-name" x-model="$store.form01.fields.name">
...
// in form02
<input id="form02-name" x-model="$store.form02.fields.name">
...
x-data="name".endpoint is still accepted.)null means recaptcha is disabled.light or dark.When submission is success, Hapi will emit hapi:success event.
When submission has error, Hapi will emit hapi:error event.
FAQs
hapiform html js library with google recaptcha
The npm package hapi-recaptcha-html receives a total of 27 weekly downloads. As such, hapi-recaptcha-html popularity was classified as not popular.
We found that hapi-recaptcha-html demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.