UNPKG

naja

Version:

Modern AJAX library for Nette Framework

18 lines (11 loc) 610 B
# Forms `FormsHandler` integrates Naja with `nette-forms` script if it is loaded. It initializes forms added to the page via snippets and prevents their submission if they fail to validate. ## Custom nette-forms By default, the nette-forms object is expected to reside in the global namespace: `window.Nette`. If you use ES modules and import nette-forms into a different variable, you should configure the correct reference manually: ```js import netteForms from 'nette-forms'; naja.formsHandler.netteForms = netteForms; ``` ?> The nette-forms reference is configurable in this way since version 1.5.0.