Skip to content

Instantly share code, notes, and snippets.

@ermst4r
Created December 10, 2018 10:02
Show Gist options
  • Save ermst4r/6c718b60a3cb8532af936aa1efbcbe12 to your computer and use it in GitHub Desktop.
Save ermst4r/6c718b60a3cb8532af936aa1efbcbe12 to your computer and use it in GitHub Desktop.
implementatrie
$.ajax({
method:"POST",
url:"https://sendtportal.com/process_person",
dataType: 'json',
data:{
'email': email,
'campaign_id':2,
'firstname': voornaam,
'lastname': achternaam,
'lastname_prefix': '',
'gender': gender,
'birthdate': '',
'address': straatnaam,
'housenumber': huisnummer,
'housenumber_addition': toevoeging,
'postalcode': postcode,
'city': woonplaats,
'phone': telefoonnummer,
'publisher_id': publisher_id,
'transaction_id': transaction_id,
'user_agent': user_agent
},
success:function (data) {
$.ajax({
method:"POST",
url:"https://sendtportal.com/process_question",
dataType: 'json',
data:{
'campaign_id': 2,
'hash': data.hash,
'answers[huidige_energie_leverancier]': $('select[name=energie]').val(),
'answers[type_woning]': $('select[name=woning]').val(),
'answers[gezinssamenstelling]': $('select[name=gezin]').val(),
'label_id':4
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment