Home > Enterprise >  Make a CTA that posts to Zapier webhook
Make a CTA that posts to Zapier webhook

Time:12-01

Hello i have this CTA i created on this page https://staging-homecarepulse-staging.kinsta.cloud/hcp-roi-calc-2/, the purpose is to send the values on the calculator to zapier

<div style="text-align:center;">
<a  target="_self" style="margin-bottom:25px;"onclick="this.href='https://hooks.zapier.com/hooks/catch/2090400/bn6llhf/?active_clients_exact=' document.getElementById('s0r2c1').value  '&active_caregivers_exact=' document.getElementById('s0r1c1').value">
<span >Get Started</span></a></div>

im trying to send the values when the button is clicked to a zapier webhook Not sure why how to set this up- Thanks in advance! really appreciate the help and guidance

Update: I changed the code to the following yo send the data to my ZapierWebhook but nothing is appearing on Zapier

this is how my input fields look

<input name="inputA1" form="form" id="s0r1c7" type="text" value="${item.value}" style="width: 80px;height: 40px;" >

button and ajax code

 <button type="submit"  id="submit-button">Submit</button>

<script>
$('#submit-button').on('click', function(event) {
  $('#notice').show();
  $.ajax({
    url: 'https://hooks.zapier.com/hooks/catch/2090400/bn6llhf/',
    method: 'POST',
    data: {
      casesturnedLastmonth: $('#s0r1c7').val(),
      averageCareTime: $('#s0r2c7').val(),
      billPerHour: $('#s0r3c7').val(),
      hoursPerClient: $('#s0r4c7').val()
    }
  });
});

</script>

any suggestion is appreciated!

CodePudding user response:

After Reviewing the code and Zapier it turns out my values are passing! this is a great method for passing input field values to a zapier webhook! hope it helps someone

  • Related