[Plugin: Contact Form 7] Custom Value for Selects (2 posts)

  1. Ashton.Sanders
    Posted 6 years ago #

    This plugin (contact form 7) is one of my favorite plugins. Extremely simple and robust at the same time. The generate tag thing is perfect.

    I was hoping to be able to add a custom value to a select.

    Here's a select tag:

    [select section "option1" "number2" "idea3"]

    This spits out:

    <select name="section">
    <option value="option1">option1</option>
    <option value="number2">number2</option>
    <option value="idea3">idea3</option>

    I need the values to be different than what is displayed, so something like this:

    <select name="section">
    <option value="ab">option1</option>
    <option value="123">number2</option>
    <option value="asd">idea3</option>

    I'm trying to just copy the code it spits out and then editing it, but it seems to check that =(

    Thanks again for the excellent plugin.

    Ashton Sanders

  2. Ashton.Sanders
    Posted 6 years ago #

    I have a quick hack:

    In the above example, I created the select tag as:
    [select section "ab" "123" "asd"]

    Then I copied the HTML it outputs, and used that as the code on the page. Then I edited the display value to be the same as above. This got it past the validation.

    It would be nice to have this as part of the plugin though ;)


Topic Closed

This topic has been closed to new replies.

About this Topic