Functionality with React Bootstrap?
Closed this issue · 3 comments
awitherow commented
Has anyone managed to get a custom form working with react-bootstrap
Forms and react-mailchimp-subscribe
?
markmssd commented
<MailchimpSubscribe
url={url}
render={({ subscribe, status, message }) => (
<div>
<Form onSubmit={formData => {
formData.preventDefault()
// uppercase EMAIL is important
subscribe({ EMAIL: email })
}}>
<InputGroup size={'lg'}>
<Form.Control
placeholder={'email@gmail.com'}
aria-label={'Email'}
name={'email'} value={email}
onChange={handleEmailChange}
/>
<InputGroup.Append>
<Button type={'submit'}
variant={'dark'}>
SUBSCRIBE
</Button>
</InputGroup.Append>
</InputGroup>
</Form>
{status === 'error' && <div style={{ color: 'red' }} dangerouslySetInnerHTML={{ __html: message }} />}
</div>
)}
/>
awitherow commented
Thanks for the information! This is good 👍
awitherow commented
Thanks for the information! This is good 👍