The list isn’t long, but the issues are rather jaw-dropping. After receiving that feedback on Keenforms, it occurred to me that there are quite a few programmers out there who are completely unaware of the problems the number input presents. The thing is, the issues cited in that article weren’t even the primary reasons why I decided to avoid it. The UK Government posted an article detailing some of the problems related to the number input. It should be noted I am not alone in the anti-number input camp. There are so many drawbacks related to number inputs when dealing with complex and conditional logic, much of it related to JavaScript issues, that for the past few years I've decided to avoid using it. Keenforms relies heavily on JavaScript and specifically React. It’s the only way to provide instant real-time feedback when creating dynamic conditional logic. However those aforementioned forms that I’ve built with those challenging requirements all required heavy use of JavaScript. I understand some people’s aversion to JavaScript. There were also some valid complaints about developers overusing JavaScript (guilty!). Using the number input makes it easier for screen readers as well. Certain mobile devices will show a number keypad instead of the full keyboard, making it easier to enter data. It has built-in validation to verify it is a number. A number input has native increment/decrement buttons. The pro-number input crowd has legitimate concerns, primarily around accessibility. However, we only use it in the dashboard and for only the simplest inputs. *Please note that Keenforms actually does use the number input inside our app. * We do have an input that’s labeled as a number, but when you add it to your form, it actually renders as. Recently I got some feedback about Keenforms, and the criticism I heard the most was the fact that Keenforms does not use the. It makes it easier to create dynamic and conditional functionality without having to write code from scratch. Keenforms is a drag-and-drop form builder with a no-code rules engine. I’ve seen so many forms that I felt compelled to build my own form builder that could handle at least some of the more challenging requests without the hassle of writing code from scratch every time. Of all the things that I’ve learned about what not to do, one of the easiest and best pieces of advice I can share is this: unless the use case is drop-dead simple, you should avoid using the number input. I’ve learned a lot of ways to overcome those challenges: what you should do, and more importantly, what you should not do when trying to meet those challenges. Each one presented a challenge that required some sort of outside-the-box or non-standard solution. However I will say this: of all the difficult, unconventional, and unusual requirements I’ve been asked to deliver over the past 15 years, most of those tasks revolved around building forms. I won’t pretend to be the expert on all things related to forms. And of all the things I’ve built on the front end, the thing that I’ve built most often is forms. While I’ve used a lot of technologies and built a lot of stuff over the years, the thing I have done the most is the front end, i.e. Thanks for taking the time to read this, ACF is my favorite plugin of all time.I’ve been writing code for at least 15 years. I know I would use it on the next 20+ sites that I’ll end up building in 2016. I know this would take some time to actually test, develop, and release but I really believe it would be a widely used and appreciated feature. This would hopefully allow developers to easily access each section for custom formatting. I imagine it could be stored as an array like this: A select box with a few common formats (888) 123-1234, 88, etc.Ĥ. Ten digits can be entered, with an extra box for extensions.ģ. So what I’m imagining would be an ideal solution/feature would be a phone number field with the following:ġ. This is alright but I end up needing to use a combinations of checkboxes to add extensions, and more custom fields to allow users to select the format () vs – or | etc… Eventually I ended up writing my own custom code that takes a straight number field, and formats it using PHP with regular expressions for the front end display. Originally I just used a text field but that’s prone to user entry errors. One of the most common fields I use on all the sites I build (Senior Developer at a small Agency) is a phone number field. I tried searching the forums for this but couldn’t find anything.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |