Title: Preselect value in dropdown using value from URL
Last modified: September 3, 2016

---

# Preselect value in dropdown using value from URL

 *  [Stephan](https://wordpress.org/support/users/deb_ugger/)
 * (@deb_ugger)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/preselect-value-in-dropdown-using-value-from-url/)
 * Hi!
 * I use Contact Form 7 and try to do following simple use case:
 * Via URL I want to set the value of the contact form. The URL looks like this:
   
   contact-form/?package=opt1
 * My contact form code looks like that:
    [select package default:get “Description
   of Option 1|opt1” “Description of Option 2|opt2” “Description of Option 3|opt3″]
 * I have 2 issues:
 * 1.
    The value of the option is ignored. It creates following code: <option value
   =”**Description of Option 1**“>Description of Option 1</option>
 * I would expect following:
    <option value=”**opt1**“>Description of Option 1</
   option>
 * 2.
    This is related to the first issue (I guess). The dropdown now doesn’t know
   the value “opt1” and hence doesn’t pre-select it.
 * Any ideas?
 * BR
    Stephan

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [staartmees](https://wordpress.org/support/users/staartmees/)
 * (@staartmees)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/preselect-value-in-dropdown-using-value-from-url/#post-8133449)
 * [http://contactform7.com/getting-default-values-from-the-context/](http://contactform7.com/getting-default-values-from-the-context/)
 *  Thread Starter [Stephan](https://wordpress.org/support/users/deb_ugger/)
 * (@deb_ugger)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/preselect-value-in-dropdown-using-value-from-url/#post-8133598)
 * The documentation describes issue #2. What about issue #1? It’s a precondition
   for #2.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Preselect value in dropdown using value from URL’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Stephan](https://wordpress.org/support/users/deb_ugger/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/preselect-value-in-dropdown-using-value-from-url/#post-8133598)
 * Status: not resolved