Form with two actions

Asked

Viewed 340 times

1

I have the form below and I need two actions:

Action 1:

Keep the action of the form that sends data to the form website (as it is today - see form below)

Action 2:

Send data through a URL that will have included in the URL the data filled in the form, example: &name=registered name&email=registered [email protected]

Where &name is the value entered on the forms and &email the completed e-mail in the form.

BS.: I need to do this action 2, because I want to send the email data and name to a second site through information in the URL. The other site already accepts this type of submission by URL "&name=nomecadastrado&[email protected]".

How can I do that?

The form I have that was made available by the tool is this below:

<!-- Formulário -->
<form action="https://leadlovers.com/Pages/Index/112646" method="post" target='_blank'>  
     <input id="id" name="id" type="hidden" value="112646" />  
     <input id="pid" name="pid" type="hidden" value="3490466" />  
     <input id="list_id" name="list_id" type="hidden" value="112646" />  
     <input id="provider" name="provider" type="hidden" value="leadlovers" />   
     <label for="name">Nome:</label>   
     <input class="form-control" id="name" name="name" placeholder="Informe o seu nome" type="text" />   
     <label for="email">E-mail:</label>   
     <input class="form-control" id="email" name="email" placeholder="Informe o seu email" type="text" />  
     <button class="btn btn-danger" style="margin-bottom:5px;" type="submit">Quero receber</button>  
     <input type="hidden" id="source" name="source" value="" />  
     <img src="https://llimages.com/redirect/redirect.aspx?A=V&p=3490466&m=112646" style="display: none;" />
</form>
  • Form you have that was provided by the tool? You can change the code of this form?

  • action 1 method post - action="https://leadlovers.com/Pages/Index/112646" and action 2 for another method get? url is that?

2 answers

1

I know well what you are wanting to do pre popular a Hotmart form with a Leadlover capture page.

Using Mautic works like this, you add at the end of the target URL the code [Urldohotmart]&name={formfield=name}&email={formfield=email}

Leadlover is like this [Urldohotmart]&name=|NAME|&email=|EMAIL|

I hope it helped

Success

  • 1

    Jacson’s answer does not lead to the solution of the problem. So it is not an answer. It is a comment. Please take the Stark overflow tour to understand how it works.

  • Really Rafael, I only came here to add value, as I went in search of the solution (tested and running) edited the answer in less than 8 hours. Now my comment is an answer ... So I hope you have resolved the issue of not being a solution, raised in your comment. Thank you

0

You could replace Submit with a button and click to check:

 $(".btn-danger").click(function(){
          $.get("dominioget/pagina.extensao?name=nomecadastrado&[email protected]"", function(data) {
              $("form").submit();
          });
    });

Browser other questions tagged

You are not signed in. Login or sign up in order to post.