I'm trying to change the form's action of an externally hosted page that redirects to an URL so that it redirects to another one. I tried the following code:
$('.shopify-challenge__button').click(function(){
$('form').get(0).setAttribute('action', 'https://url');
});
I think that there could be the following problems: Maybe I can't override the page from local, or I'm not identifying the form correctly (it has no id or class).
Thanks for your time!