• Hello, I am looking to use the custom javascript on mail success field in admin to send form data as JSON to a webhook. Here’s my code:

    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://sokt.io/XXX/",
      "method": "POST",
      "headers": {
        "content-type": "application/json",
        "authkey": "XXX"
      },
      "processData": false,
      "data": "{\"name\" : \"name\"}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });

    Where “name” and “name” represent each form field as key and value. What I can’t figure out is exactly what syntax and how to plug each individual key and value in. Can anyone help? Thanks! Tom

The topic ‘Access form data via Javascript on success’ is closed to new replies.