The code below when embedded within an iframe opens up the redirect within the iframe, and I think because of the way this form is created by the 3rd party, adding a target=“_blank” does not work.
As a work around I am trying to have the form itself open in a pop-up generated by the javascript around it so that at least the redirect will take up the whole new page. The problem is that when I try to insert the form code inside the javascript it does not work.
How can I embed the form code inside this popup? Or is there a better way?
thank you
Form code:
I consent for client to hold this data
<input type=“submit” value="Submit & Go "
Popup code
Try it
Hi Simon:
If I were you I would remove the iFrame and simply convert the HTML to a regular wix page using inputElements for the form fields.
You can then have a submit button that calls the wix-location.to() function to perform your page redirect.
If you want a pop up specifically then you can use a lightbox for that and load it using wixWindow.openLightbox .
Is there a reason why you are using an iFrame?
Cheers
Steve
Hi Steve
Thanks for this reply.
The code here is supplied by the third party customer data capture service and hence I am simply embedding that code the only way I know how - in an iframe. If I were to use input elements I would not know how to get that information passed over to their system.
Finally I have found a solution by simply adding formtarget=“_blank” inside the submit input attributes.
Thanks again for reaching out.
Simon