Form Submission

Hi, Is it possible pass form action on Wix code so that can help to redirect user to external webpage after complete feed a form which i have embed HTML and JavaScript Codes on Wix after form Submission by using Wix Code ?? if Yes let me know how to implement this as on wix they don’t allow to redirect to external webpage

Hi!

Assuming you’re using a promise to send your submission form (to update it in your database and what not), all you need to do is to use the wixLocation API when the promise has returned.

You can either redirect your page to another page in your wix site or to an external webpage.
Make sure to follow the relevant instructions in both cases.

Hope it helps.
Best of luck!

Doron. :slight_smile:

Hi Doron,
Problem on the URL where form point(form action) need those data so that can process registration process I have try by using normal HTML and JAVASCRIPT work problem come to wix they don’t allow redirect to external webpage so even if form work so after submission user still be in wix website and not on the webpage to continue with registration

I have use that wixLocation API but that redirect only without catch those data submitted

Thanks!
Alex

Hi,
I would consider using query strings params in the external site.

const firstName = $w('#firstNameInputField').value;
const lastName = $w('#lastNameInputField').value;
wixLocation.to(`www.yourExternalSite.com/?firstname=${firstName}&lastname=${lastNmae}`;

Good luck!
Roi.