Skip to content

Instantly share code, notes, and snippets.

@qstudio
Last active October 12, 2020 19:20
Show Gist options
  • Save qstudio/2cde194c7e0636ec6948883a8af65f98 to your computer and use it in GitHub Desktop.
Save qstudio/2cde194c7e0636ec6948883a8af65f98 to your computer and use it in GitHub Desktop.
// add form inputs ##
function add_honey( e ) {
jQuery( '.form' ).append( '<input type="text" name="honey" id="honey" data-form-mel-input tabindex="-1" autocomplete="false" data-form-required value="" />' );
}
// scan for forms to validate ##
[ "DOMContentLoaded" ].forEach(function(e){
window.addEventListener( e, add_honey, false );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment