Support » Plugin: PDF Forms Filler for Contact Form 7 » Map to raw value of pipe selection

  • Resolved libraryit



    I’m using the WPCF7_USE_PIPE feature to include both a publicly displayed value and a hidden value in a select field. I need to use both halves of the value pairs in the submitted form.

    [select* location include_blank "place1|email1" "place2|email2"]

    Based on the user’s selection, I use the pipe selection in the mail configuration to send the form to the correct recipient ([location] = email). However, I also need to use the raw text before the pipe as information submitted in the form ([_raw_location] = place). This works in mail fields – I can use both/either. Since I can’t edit the source form fields in the Form Field Mapper, I’m having trouble figuring out how to map this. Is there a way I can map the raw value before the pipe to a PDF field?

    Thanks for the great tool!

    • This topic was modified 6 months, 2 weeks ago by  libraryit.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author


    How are you able to get the “_raw_location” mail-tag? I don’t think WPCF7_USE_PIPE does that.

    The plugin currently doesn’t allow you to enter any arbitrary mail-tags that are not fields on the form. I will consider adding this feature in the future. However, what you can do in the meantime is add a custom hidden mail-tag with some custom code and add it onto the form as a field. Once you do that, you will be able to map it to a PDF field.

    Here is the article that references the [_raw_value] option to select a value listed before a pipe delimiter, or [value] to select the value listed after a pipe delimiter, using WPCF7_USE_PIPE.

    I’m sorry I don’t really understand your suggestion about a custom hidden mail tag. I need to map a the value a user selected in a drop down field, but that doesn’t appear to be possible when using a pipe-delimited selection field. Only the value hidden by the pipe is being mapped to the PDF.

    Is your suggestion that I should avoid using pipe-delimited selections, and use a custom hidden mail tag in order to send email to different form recipients? Thanks again!

    Plugin Author


    Thanks for pointing out documentation about the “_raw_” values. It make sense to add a feature to the plugin that would allow users to map these values. I will add that in when I get a chance.

    Meanwhile, you can use my suggestion,

    1. Install this plugin:

    2. Add a shortcode roughly like this,

    add_shortcode( 'get_value_shortcode', 'get_value_shortcode_handler' );
    function get_value_shortcode_handler(){
    return $_POST['value'];

    3. Use the following CF7 tags and map them to the appropriate PDF fields,
    [radio value “f|FEMALE” “m|MALE”]
    [dynamichidden raw_value “get_value_shortcode”]

    I know this is really ugly, but I am sure you can come up with something prettier, given the time.



    Thank you! I can make it work with that.

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