• itiab

    (@itiab)


    Sorry if this is an obvious question:
    I’m, wanting to change one of the form fields ( Product-interested-in ) to automatically be populated from a field / value in the post the contact form is embedded in.
    e.g. if I have a post called Volkswagon Beetle all about the product Volkswageon Beetle I would like the contact form field called product-interested-in to automatically be filled with Volkswagon Beetle so I know what page the post was sent from.

    Normally I would use get_field(‘product-name’);, get-title(); or similar to grab the current posts info. How do I then get it into the form.
    Do I need to write some js that alters the inner html when the page is loaded?

    Cheers
    Shane,

The topic ‘Changing field values based on parent post / page’ is closed to new replies.