I've got a form, that sometimes needs to have a button allowing people to authorize with stripe. To save their data I'm submitting the form to a php file, that compiles the auth URL and saves their data. This javascript function is run when the button is clicked:
function stripeAuth(){
console.log('StripeAuthRun')
$(".createAlbumForm").get(0).setAttribute("action", "/utils/stripeAuth.php");
$(".createAlbumForm").submit();
}
It puts StripeAuthRun into the console, and changes the action attribute, but doesn't actually submit the form. The form is valid and can be submitted normally. What am I doing wrong?