Your hook name uses an underscore:
add_action( 'wp_ajax_save_form', 'save_form' );
add_action( 'wp_ajax_nopriv_save_form', 'save_form' );
But your action uses a hyphen.
action: 'save-form'
These need to match:
action: 'save_form'
Also, your AJAX callback appears to be in apps/save_signups.php
, but you are only requiring that file inside the admin_menu hook
:
require_once ( 'apps/save_signups.php' ); //process submitted form <== ???
}
add_action( 'admin_menu', 'wpdocs_register_able_signup_menu_page' );
But seeing as there’s no admin menu needed for AJAX requests, that hook doesn’t run on requests to admin-ajax.php, so the callback is never registered.
I don’t know what other code is in apps/save_signups.php, so I can’t say whether that entire file should be required anywhere else, but your add_action()
calls that hook save_form()
should be hooked outside of any other hooks.