Support » Plugin: Contact Form 7 - Post Fields » Append or Prepend additional option to Post select dropdown

  • Resolved shakeycal

    (@shakeycal)


    Hi there,

    Thanks for the plugin, it’s a great help for us. I was wondering if there is an option or hook to add an extra select option before or after the list of posts?

    For example, we use an enquiry form for customers to contact us about specific products, but it would also be really useful to add an ‘Other products’ option without having an extra post for it.

    Cheers!
    Cal

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Markus Froehlich

    (@markusfroehlich)

    Hello Cal,
    you can use the wpcf7_{$tag_name}_field_post_data filter for this.
    So you can extend the $field_post_data with your specific data.

    Best regards
    Markus

    shakeycal

    (@shakeycal)

    Hi Markus, thanks a lot. I have ended up doing this via JS because I needed to insert an extra option into the field post data, and it was easier than trying to break out the content and reassemble in php, but the info will definitely come in useful in the future.

    Plugin Author Markus Froehlich

    (@markusfroehlich)

    Hello shakeycal, no problem 🙂

    If you like my plugin, please give me a positive rating with WordPress-Page.

    Best regards
    Markus

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Append or Prepend additional option to Post select dropdown’ is closed to new replies.