After a user registers on the site with a User Form I have them directed to a Post Form for adding a cpt. It used to work fine, not sure if an update or some setting I adjusted changed things but now the Submit button on the Post form is disabled so they cannot submit the second form.
You can see this behavior by filling out the initial form:
Thanks, but replaced the file and the button is still disabled. What's odd is that it's not disabled if I'm logged in as an Admin only if I register as a member which puts the user into Author role. I am using Access but this form is not restricting the Author role.
Ah, found the reason, I added the code below in my functions file in order to redirect users to their account page when they log in. When removed the button is no longer disabled. So I guess it's causing some type of js error "No 'Access-Control-Allow-Origin' header".
function cm_redirect_users_by_role() {
$current_user = wp_get_current_user();
$role_name = $current_user->roles[0];
if ( 'author' === $role_name ) {
wp_redirect( '<em><u>hidden link</u></em>' );
} // if
} // cm_redirect_users_by_role
add_action( 'admin_init', 'cm_redirect_users_by_role' );
And I also have code that auto-logs in users once they register, which maybe ultimately leads to this issue.