hapiform html js library with google recaptcha
npm install hapi-recaptcha-htmlhtml
`
Usage
`html
enquiry-forms.js file:
`
please note that you must use $store. to bind inputs.`html
// in form01
...// in form02
...
`
- name – The name of the instance, to be matched with x-data="name".
- hapiformID – hapiform ID. (old version endpoint is still accepted.)
- redirectTo – Location to be redirected after success. Eg: "/thank-you" or "https://example.com". (Optional)
- integrationScriptUrl - optional, POST current DataForm to external URL (API).
- captchaId - Id of div element to render the google recaptcha, null means recaptcha is disabled.
- recaptchaTheme - light or dark.
- onSuccess() – On success event.
- onFailed() – On failed event.
- errors.recaptchaError - to display captcha verification errors.
Events
$3
When submission is success, Hapi will emit hapi:success event.
$3
When submission has error, Hapi will emit hapi:error` event.