3

I want to add 3 text boxes for a phone number field. The phone number format should be xxx xxx xxxx.

I need to show 3 text boxes and stored values into single field.

How can I do this?

closed as too broad by kiamlaluno Feb 13 at 11:41

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Where you wanna add those fields? Node edit form? Custom form? Where you wanna have them displayed how? – leymannx Nov 5 '15 at 23:14
4

You can use Masked Input to format a field. It won't give you three text boxes. But it can solve your problem by formatting the text box like below,

masked input formatting

1

Instead of creating the three different fields, create only one field of type phone by installing any of the below module.

  1. Phone
  2. Phone Number (CCK)
  3. Telephone
  • Yes i know. But as per my requirement, i need to show 3 text boxes – Guru Nov 3 '15 at 10:41
  • can you please tell me any specific reason behind creating 3 text boxes? I think you should create one field and using jQuery format the display. – Nikhil Banait Nov 3 '15 at 10:44
  • @Guru - simply go for one Telephone field and it's cardinality set to three. – leymannx Nov 3 '15 at 23:29
1

Have a look at the Field Group module, to create a group of 3 'fields' (1 for each of your 3 textboxes).

Excerpt from its project page:

Fieldgroup will group fields together. All fieldable entities will have the possibility to add groups to wrap their fields together. Fieldgroup comes with default HTML wrappers like vertical tabs, horizontal tabs, accordions, fieldsets or div wrappers.

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