• Resolved mase2005

    (@mase2005)


    Is it possible to set custom field values separate from the option display name? For example, a select drop-down field could have options “Billy” and “Bob” with corresponding values “billy@email.com” and “bob@email.com”.

    Alternatively, is it possible to use if/else statements in the email template? For example, if [menu] = “Billy”…

    http://wordpress.org/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • This is supposed to be possible, although I have been unable to get my “values” to show up in the select list on the front-end.

    You are supposed to be able to do it with the pipe character “|”, for instance:

    [select my_select_name class:whatever id:whatever include_blank “option|value” “option2|value2”] etc. The “include_blank” puts an initial “—” on the first line of the list.

    In my case, however, whatever I use as the option also ends up being the value on the front end. I may have goofed up the syntax. Not sure.

    But you can find an article using your example of email addresses here:
    http://contactform7.com/selectable-recipient-with-pipes/

    Thread Starter mase2005

    (@mase2005)

    Thank you! This worked for me. The values do not show up on the front end, but they DO work when the form is processed.

    It would be interesting to know “where” the values are and “when” they become the values of the select item they’re associated with. I am using a list with names of events. After the pipe I put the cost of the event. I am using jquery to grab the value and attached it to a post to PayPal. I also print the value to my console. So if I have Billionaire|5000, the console lists the value as “Billionaire” and of course PayPal tells me I’ve sent along a incorrectly formatted amount. So true. Obviously I want it to send 5000. Ugh.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom field value’ is closed to new replies.