javascript - Using onSubmit with form in Featherlight? -
i using featherlight display html form , not able following:
load page form hidden initially.
have form's "onsubmit" fire when form submitted using standard html submit button.
i call inital lightbox manually global variable can use "persist" option:
lightboxform = $.featherlight('#attendeeaddeditform', { 'persist' : true });
...but can't seem "beforeopen" syntax correct prevent displaying:
beforeopen: function(event){return false}
...doesn't work inside above call.
here simplified version of trying do:
http://jsfiddle.net/djwljr/jnsu6/142/
any appreciated. thanks!
first, can set persist option using data-featherlight-persist="true" if prefer (same featherlight options).
second, either call $.featherlight(...) open window immediately, or bind button $('.my-button').featherlight(...) (or data-featherlight). second form not open dialog immediately, desire. don't think you'll need beforeopen @ all.
Comments
Post a Comment