Telivy
Telivy
Telivy
Telivy
Telivy
Telivy
Telivy
Telivy

Configure Lead Magnet with Own Form

For a more customized implementation.

Here's a detailed guide on making a POST call in JavaScript to Telivy backend form input when a submit button is clicked on your own form:

1

Set Up The HTML Form

Create a form with the method attribute set to POST and a submit button.

1

Set Up The HTML Form

Create a form with the method attribute set to POST and a submit button.

2

Attach A JavaScript Event Listener

Use addEventListener to listen for the submit event on the form.

2

Attach A JavaScript Event Listener

Use addEventListener to listen for the submit event on the form.

3

Gather Form Data

Use FormData to construct a data object from the form's input fields. Add the agentId or UTM Source fields to the form data if necessary.

Before you proceed any further, please make sure that the following validations to the data are passed:

Email Is Valid

Domain Is Valid

Ensure the email has an "@."

3

Gather Form Data

Use FormData to construct a data object from the form's input fields. Add the agentId or UTM Source fields to the form data if necessary.

Before you proceed any further, please make sure that the following validations to the data are passed:

Email Is Valid

Domain Is Valid

Ensure the email has an "@."

4

Send The POST Request

Use the fetch API to send the POST request.

Here's the full example:

Terminal
java
                                          
4

Send The POST Request

Use the fetch API to send the POST request.

Here's the full example:

Terminal
java
                                          
Last Updated On 2024-03-07
Was this page helpful?
Last Updated On 2024-03-07
Was this page helpful?

Configure Lead Magnet with Own Form

For a more customized implementation.

Here's a detailed guide on making a POST call in JavaScript to Telivy backend form input when a submit button is clicked on your own form:

1

Set Up The HTML Form

Create a form with the method attribute set to POST and a submit button.

1

Set Up The HTML Form

Create a form with the method attribute set to POST and a submit button.

2

Attach A JavaScript Event Listener

Use addEventListener to listen for the submit event on the form.

2

Attach A JavaScript Event Listener

Use addEventListener to listen for the submit event on the form.

3

Gather Form Data

Use FormData to construct a data object from the form's input fields. Add the agentId or UTM Source fields to the form data if necessary.

Before you proceed any further, please make sure that the following validations to the data are passed:

Email Is Valid

Domain Is Valid

Ensure the email has an "@."

3

Gather Form Data

Use FormData to construct a data object from the form's input fields. Add the agentId or UTM Source fields to the form data if necessary.

Before you proceed any further, please make sure that the following validations to the data are passed:

Email Is Valid

Domain Is Valid

Ensure the email has an "@."

4

Send The POST Request

Use the fetch API to send the POST request.

Here's the full example:

Terminal
java
                                          
4

Send The POST Request

Use the fetch API to send the POST request.

Here's the full example:

Terminal
java
                                          
Last Updated On 2024-03-07}
Was this page helpful?
Last Updated On 2024-03-07}
Was this page helpful?

Configure Lead Magnet with Own Form

For a more customized implementation.

Here's a detailed guide on making a POST call in JavaScript to Telivy backend form input when a submit button is clicked on your own form:

1

Set Up The HTML Form

Create a form with the method attribute set to POST and a submit button.

1

Set Up The HTML Form

Create a form with the method attribute set to POST and a submit button.

2

Attach A JavaScript Event Listener

Use addEventListener to listen for the submit event on the form.

2

Attach A JavaScript Event Listener

Use addEventListener to listen for the submit event on the form.

3

Gather Form Data

Use FormData to construct a data object from the form's input fields. Add the agentId or UTM Source fields to the form data if necessary.

Before you proceed any further, please make sure that the following validations to the data are passed:

Email Is Valid

Domain Is Valid

Ensure the email has an "@."

3

Gather Form Data

Use FormData to construct a data object from the form's input fields. Add the agentId or UTM Source fields to the form data if necessary.

Before you proceed any further, please make sure that the following validations to the data are passed:

Email Is Valid

Domain Is Valid

Ensure the email has an "@."

4

Send The POST Request

Use the fetch API to send the POST request.

Here's the full example:

Terminal
java
                                          
4

Send The POST Request

Use the fetch API to send the POST request.

Here's the full example:

Terminal
java
                                          
Last Updated On 2024-03-07
Was this page helpful?
Last Updated On 2024-03-07
Was this page helpful?
ON THIS PAGE
Set Up The HTML Form
Attach A JavaScript Event Listener
Gather Form Data
Email Is Valid
Domain Is Valid
Send The POST Request
Back to top