I see a lot of requests for "Can we have an email type for email component?" etc. Instead of just making each email component type="email", why not add a new field on the component creation where users select the type attribute themselves. I.e. we can still have an email component set as type="text" if we want, for whatever reason.

This will help in maintaining, because if you set this as "create input type="[form-option]", then pull in the options as a list, we can always add one ourselves in the code without having to wait until it gets implemented and you don't have to have a queue full of feature requests for this.

Another good use case is this:

Say you have a phone number field, you want type="number" or type="tel" etc because you want a mobile device to auto load a number pad for that field but on a browser you get a stupid up/down number dial. So you can add two fields, one tel and one text, and show only one based on media queries. So browsers will only get the field text and phones will get the field tel. Done.

Best part is, this probably wouldn't be too much work to implement and in the future, when you do want to add more types, you can just add one, roll a patch, done.

Comments

DanChadwick’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I think that this sort of rendered output customization can be handled with theming. Absent a greater demand, I'm going to close this old issue.