Replies: 2 comments
-
Thanks @DanDiplo. I think it's a great idea. If you're happy to do a PR, that'd be ace. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing discussion... feature added by @DanDiplo in #233 (for Contentment v4.1.0) 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I love the ability to prepend and append icons to the Text Input datatype - it works really well for when you are looking to input (say) an email address or an external URL, as you can use the icon and placeholder to indicate this. But what is missing is the ability to change the HTML input type - it is always
<input type="text">
. It would be a nice enhancement if you could select from a list of common HTML input types, namelytext
,email
,url
,tel
(and maybetime
).I threw together an example in code which I'm happy to submit as a PR. So in the configuration editor you can select the type from a dropdown (with
text
as the default). In the example below I've set it as typeemail
:The nice thing is that this automatically triggers Umbraco validation, so if you set it to
email
but it's not valid then you can't submit it:This also works for the other types, so if you set it to
url
then you have to enter a valid URL etc.If you like the idea then I've got the core code working and can submit it as a PR (or just add it yourself as it's not much code!).
I think it should be backward compatible as it will default to
text
for previous instances. But you might be able to judge that better than me.Example:
Beta Was this translation helpful? Give feedback.
All reactions