Skip to main content

Looking for the "right" way to hook into the form submission API

Hi folks, we'd like to add some JS actions—adding content to fields—to an NationBuilder form on submit before the form validation/send is triggered. However binding on the form submit handler triggers after the NationBuilder actions and the data is not captured.

Is there an elegant/sanctioned way to hook into the event dispatcher? Essentially I need a callback before the form submits though NationBuilder XHR channels. Someone has a gist of how to do this, but the timing of this isn't correct (form still submits).

Share this post

Showing 1 reaction

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.