Add URL queries to an iframe in ty page

Hi,

This is my first time posting to the form, as I am a novice at wix code.

I was able to create a form to add url parameters to form fields as well as hidden form fields (s1 and s2) via https://www.axiomcreditrepair.com/ailp?fname=richard&lname=test&email=test@gmail.com&phone=9491231234&s1=123&s2=321

However, what I want is when the user submits the form, I need the parameters s1 & s2 to fire off into an iframe on a thank you page (see url example above and submit) which will contain the parameters s1 and s2 and load into the third party providers database. Which, I’m pretty sure the best option to do is an iframe as it will load when the page loads.

I need to edit the url in the iframe when a user hits submit and is redirected to a thank you page so our third party can get the s1 and s2 data, for example:

<iframe src="https://example.com/example?s1=123&s2=321" height=1 width=1 style="display:none;"></iframe>

I have already taken a look at Velo: Working with the HTML iframe Element | Help Center | Wix.com, however, I am very new to this and would like to see example code as that article did not help me.

Thank you

Adding code to an HTML component is not a part of the Corvid product (which is what this forum is about). You can use the article you referred to for information on using and HtmlComponent, and you can use these examples to learn from:

Multiple Markers in Google Maps

Embed Google Map on your site with multiple location markers , marker clustering, and custom controls using the HTML component.

Fullscreen with HTML Component

This example demonstrates the requestFullscreen method of the HTML fullscreen API as used to change a specified element to full screen.

Chart

Use JavaScript post messages to communicate with the HTML component . In this example, learn how to embed a chart on a page.

:boom::boom::boom: However , I would highly recommend building your form using the Wix Editor and then adding code if necessary. You will be able to create a more natural experience for the user and your site will be easier to maintain.

See these examples to see how to create your own forms:

Basic Form

Create a basic form without writing a line of code. Use input elements, a dataset, and a button to capture and store user input in a database collection.

Collapsing Form

Collapse and expand sections of a form.

Multistage Form

Split a form into multiple stages using a slideshow.

Cascading Form

Automatically populate a form element with options based on a previous selection.

Custom Validations

Validate a form using regular expressions and the custom validations API.

Is there an alternative method that may be better in wix code where if a user visits the “thank you” page I can fire off a URL with query parameters matching what was in the hidden fields in the previous form page? I just need to send information in a URL after a form has been submitted simply put. Do you have example code for this?

@richievalenta Do you want to send the information to an external service? You should look at the wix-fetch API . You can call the backend routine from the thank you page.

@yisrael-wix We just want to send the url parameters s1 and s2 over to an external URL when a form is submitted via the wix forms. Will wix-fetch API help with this?

@richievalenta You can either user wix-fetch or wix-location.to() . The advantage to using wix-fetch is that you can put the code in the backend and hide it from the user.