WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Values for drop downs (7 posts)

  1. sajay
    Member
    Posted 3 years ago #

    I'm creating a contact form and I'd like to add data values for the options presented in the drop down. For example the person completing the form would see "Option 1", "Option 2", and "Option 3" but the actual data values being sent in the form would be "Data 1", "Data 2", and "Data 3". Is this possible with CF7?

    Thanks in advance.

    Scott Jay

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    Yes. You can do it by utilizing the pipe feature.

    http://contactform7.com/blog/2009/11/26/selectable-recipient-with-pipes/

    Like this
    [select menu-123 "Option 1|Data 1" "Option 2|Data 2" "Option 3|Data 3"]

  3. sajay
    Member
    Posted 3 years ago #

    Yay! Thanks!

  4. sajay
    Member
    Posted 3 years ago #

    Now, can I get a variable from a page to be used in a contact form?

    I'm setting up a form to text driving directions for several Inns to a visitor's cell phone. Each Inn will have a profile page and (obviously) different driving directions. I'd like to set a custom variable within each page with the URL to the page for driving directions that can be sent in the body of the message.

    Is this possible?

  5. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

  6. sajay
    Member
    Posted 3 years ago #

    Looks like it will work, but...

    I have a custom field on my page called "d-url" and it has a URL as a value. When I put the following shortcode into my contact form the value from the custom field does get put into the form. However, the form does not get sent.

    [dynamictext url "CF7_get_custom_field key='d-url'"]

    I have [url] in the body of the message.

    The form does get sent without the shortcode.

    Thanks. The help is much appreciated!

  7. sajay
    Member
    Posted 3 years ago #

    I guess my cell phone carrier does not like tinyurl addresses in text messages. I got it to work. It was not a problem with your plugin at all!

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic