• I have a Contact Form that collects six fields:

    ReadMeters
    MailBills
    DueDate
    DelinquentDate
    FinalNotice
    CutOff

    I want to pass the values entered in each of these fields to an array (dayVars) I have defined in my functions.php file so they are accessible to a javascript that calls a Google Chart on the page that is called after the form is submitted.

    I’m struggling to figure out how to do this. I’ve tried putting this code as a script to run after the form is sent successfully, but no luck:

    dayVars.daysReadings = wpcf7.form.ReadMeters;
    dayVars.daysMailed = wpcf7.form.MailBills;
    dayVars.daysDue = wpcf7.form.DueDate;
    dayVars.daysDelinq = wpcf7.form.DelinquentDate;
    dayVars.daysFinalNotice = wpcf7.form.FinalNotice;
    dayVars.daysCutOff = wpcf7.form.CutOff;

    Can you please point me in the right direction?

    Thanks!

    The page I need help with: [log in to see the link]

  • The topic ‘Accessing value of Contact Form field’ is closed to new replies.