Support » Plugin: Contact Form 7 » Hidden field post_url

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @danstramer,

    I guess you might be interested in this plugin: https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/

    Thanks Chesio, I wanted to reduce the use of plugins, and since CF7 has a built in functionality for hidden fields and special mail tags, I thought it would be possible to utilize both options without installing another 3rd party plugin.

    Dan

    How exactly you send the data to the external CMR? If it’s via email body then you can simply use [_post_url] or similar: https://contactform7.com/special-mail-tags/

    Otherwise, if you want to have CF7 only implementation, you have to pass URL via form shortcode attribute (as described in the second link you posted), but that requires some programming on your side.

    I’m sending the data via a plugin: https://querysol.com/product/contact-form-7-redirection/
    If I insert [_post_url] in the body of the form it just outputs “[_post_url]” in the front end.
    If I add [hidden my-page _post_url] is doesn’t show any value.

    If I insert [_post_url] in the body of the form it just outputs “[_post_url]” in the front end.
    If I add [hidden my-page _post_url] is doesn’t show any value.

    That’s why I asked how you send the data. The [_post_url] tag is meant to be used in email body (not form body).

    I don’t know the Contact Form 7 Redirection plugin, so I cannot help you with that.

    Thanks Chesio
    If I could have a hidden field in the form body which would hold a meta value (_post_url or _post_title etc…) that would solve my issue, since the redirection plugin can work with that data.
    So, essentialy I’m looking for the correct syntax of this shortcode:
    [hidden my-page _post_url]
    Which will output in the form body something like this:
    <input type="hidden" name="my-page" value="https://the URL of the page where the form is" class="wpcf7-form-control wpcf7-hidden" data-fontsize="20">

    I understand, but I don’t see easier way to do that other than install the Contact Form 7 Dynamic Text Extension plugin – then you only have to insert this in form body: [dynamichidden my-page "CF7_URL"] 🙂

    Yes, thank you very much for your help with that.
    I would think that CF7 would have this kind of functionality built in, or at least doable with a few steps.
    Maybe in a future release…

    Dan

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.