3

I use Drupal 7 with Webform 7.x-3.9.

I have created a new component from type "select options". I also have chosen to display it as a listbox and I've populated it with a few strings from the type "safe_key|Some readable option" as expected. Here's an example :

1|Mr.

2|Ms.

3|Miss

Everything works perfectly well and the behavior is the following :

  • If I select this component to be mandatory, the display will be "-Select-"
  • If I don't select this component to be mandatory, the display will reflect the first string from the "Options" text area. In my example, it will be "Mr."

Now, imagine I want to have "Ms." but don't want to change the order. Nowhere I see this possible. Unfortunately, the "Default value" textfield is only used for tokens...

Any idea ?

2

All you need to do, it to put the key value into the default value field, in this case 2, to make Ms. the default value of the form. This is what the default value if used for.

1
  • Oh ok, I put the safe key + the option...that's why I couldn't make it work. Thank you !
    – vanz
    Mar 16 '11 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.