function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
staging serverstaging server 

web-to-lead custom field not displaying values

Hello, I have implemented a web-to-lead on a form on my client's website via an AJAX request and the name and email fields are getting generated correctly in Salesforce, but the custom field I've implemented is not. 

This is the html code:
<input type="hidden" name="00Nw00000090NEa" value="{{reference.salesforce_title | strip_html}}" id="00Nw00000090NEa">
This is my javascript:
$(document).ready(function() {
  $('#js-case-study-submit').on("click", function(e){
     e.preventDefault();

    var firstName = $('#case-study-form').find('#first_name').val();
    var lastName = $('#case-study-form').find('#name').val();
    var email = $('#case-study-form').find('#email').val();
    var caseStudyName = $('#case-study-form').find('#00Nw00000090NEa').val();

    var formData = {};
    formData.first_name = firstName
    formData.last_name = lastName
    formData.email = email
    formData.oid = "00Dw0000000mDvD"
    formData.case_study_name = caseStudyName

    $.ajax({
      type: "POST",
      url: "https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8",
      data: formData
    });
    $('#case-study-form').submit();
  });
});

And I can see that the values are getting passed correctly to the field, when I click on edit, they are there in the dropdown, but I do not know why I cannot display these values. See screenshot:

User-added image

 

Thank you!!