1

I have a webform, with a field for phone number.

I would like to have another select dropdown field before phone number, with country name and country phone number prefix.

Eg:
Singapore (65)
United Kingdom (44)
Venezuela (58)

  • Have you tried drupal.org/project/webform_phone ? – Rupesh Jun 16 '15 at 5:43
  • Yes I had tried this, but it does not provides a drop down in the webform, for user to choose their country with country phone code – vences Jun 16 '15 at 5:49
1

Webform allows you to load options in bulk. Just google for this list and load it into a spreadsheet. Use a bit of find/replace to get it into the format needed by a webform select element, which is:

65|Singapore (65)
44|United Kingdom (44)
58|Venezuela (58)

Then create a webform select field and paste it in.

To get the fields to line up side-by-side (with country code right before phone number and not on a separate line) use the webform_layout module.

| improve this answer | |
  • I forgot about this options in bulk! Thank you so much! – vences Jun 18 '15 at 8:10

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.