I have implemented a custom field type.
Is there any way to register a javascript event handler that is called before my custom field is saved?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityI have implemented a custom field type.
Is there any way to register a javascript event handler that is called before my custom field is saved?
Attach a submit event to the #entry-form element:
$('#entry-form').submit(function(e) {
// code run on submit here
});