Open MayhemBliz opened 4 years ago
You can do this by adding your group information to the data you are sending in submit:
const submit = () =>
email &&
name &&
email.value.indexOf("@") > -1 &&
onValidated({
EMAIL: email.value,
NAME: name.value
"group[611][64]": "1"
});
Not sure if you can do this somehow in your package or it is a Pull request.
I would like to add the contact (who submitted the form) to be added to a custom group setup in mailchimp: https://mailchimp.com/help/automatically-add-subscribers-to-a-group-at-signup/
You would do this normally with the followoing line in your form:
<input type="hidden" name="group[611][64]" id="mce-group[611]-611-0" value="1">
Tried adding the following to the react component:
<input name="group[611][64]" id="mce-group[611]-611-0" defaultValue="1" />
But I take it I need to add these to the submit and onValidated, here is my entire code: