Here’s an example of consuming the API by using Require.js:
<html>
<br>
<script src='/require.js'></script>
<form>
<input name='email'><br>
<input type='submit'>
</form>
<script>
// Yes, this is actually an AMD usage of the library, and is correct, and uses Require.js
require(['https://unpkg.com/goodforms@0.9.2'], function(goodforms) {
// Configuration loaded now, safe to do other require calls
// that depend on that config.
goodforms('your_form_key', {debug: true})
require(['foo'], function(foo) {
});
});
</script>
</html>Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article