Spam protection
Protect against spam responses using Google reCAPTCHA.
Set up Google reCAPTCHA
import { Composer, Formsmd } from "formsmd";
const composer = new Composer({
id: "my-form"
});
composer.choiceInput("position", {
question: "What's your position?",
choices: ["Product Manager", "Software Engineer", "Founder", "Other"],
required: true
});
// Set the site key during instantiation
const formsmd = new Formsmd(
composer.template,
document.getElementById("my-form-container"),
{
recaptcha: {
siteKey: "<YOUR_RECAPTCHA_KEY>"
}
}
);
formsmd.init();The recaptcha option
recaptcha optionName
Type
Description
Hide the badge
Server-side validation
POST Parameter
Description
Last updated