• Resolved Benoit Chantre

    (@benoitchantre)


    Hello,

    I have noticed an issue when a select uses pipes.

    [select your-recipient "CEO|ceo@example.com" "Sales|sales@example.com" "Support|support@example.com"]

    Example from https://contactform7.com/selectable-recipient-with-pipes/

    This should produce the following HTML code

    <select class="wpcf7-form-control wpcf7-select" aria-invalid="false" name="your-recipient">
      <option value="ceo@example.com">CEO</option>
      <option value="sales@example.com">Sales</option>
      <option value="support@example.com">Support</option>
    </select>

    But instead, it produces this code

    <select class="wpcf7-form-control wpcf7-select" aria-invalid="false" name="your-recipient">
      <option value="CEO">CEO</option>
      <option value="Sales">Sales</option>
      <option value="Support">Support</option>
    </select>

    The expected option values are replaced by the label.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    No. The latter is the expected output.

    Thread Starter Benoit Chantre

    (@benoitchantre)

    Thank you.

    I think I misread that part of the documentation

    If you insert a pipe (‘|’) character in the middle of the option value, only the part before the pipe will be open to the outside, and the part after the pipe will be used for mail replacement.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Selectable recipient with pipes doesn’t work’ is closed to new replies.