Skip to content

Instantly share code, notes, and snippets.

@BjornDCode
Last active August 13, 2021 07:37
Show Gist options
  • Save BjornDCode/ea370256a551542df8e830e1403fcf29 to your computer and use it in GitHub Desktop.
Save BjornDCode/ea370256a551542df8e830e1403fcf29 to your computer and use it in GitHub Desktop.
Embed form in Next.js
import Head from 'next/head'
export default function Home() {
return (
<div>
<Head>
<script type="text/javascript">
{`
window.Reform=window.Reform||function(){(Reform.q=Reform.q||[]).push(arguments)}
`}
</script>
<script
id="reform-script"
async
src="https://embed.reform.app/v1/embed.js"
></script>
<script type="text/javascript">
{`
Reform('init', {
url: 'https://forms.reform.app/XM7SfH/untitled-form-3',
target: '#my-reform',
})
`}
</script>
</Head>
<main>
<div id="my-reform"></div>
</main>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment