5 ms·
Extend Twitter Bootstrap with these Bootstrap Form Helpers
- RossM 14y agoA couple of issues in Chrome (stable): I can't type in or move the cursor between sub-fields on the phone controls. Where does your country-state data comes from? I've never seen a list so complete for countries outside the US!
- vlamanna 14y agoThe issues with the phone controls will be fixed. https://github.com/vlamanna/BootstrapFormHelpers/issues/2 https://github.com/vlamanna/BootstrapFormHelpers/issues/2 As for the data, I've worked hard to build this and I will also soon release it in other languages.
- _pdeschen 14y agoBtw if you're interested in a complementing piece of code, I have a small library [1] would give you the country for a given phone number (e164), so it could be used to prefill a default country value. It's not returning ISO code but I was planning on adding such feature. [1]: https://github.com/pdeschen/e164.js https://github.com/pdeschen/e164.js
- eranation 14y agoThe country / state linked selects is very nice, but the phone masking feature seems still work in progress, I use this one for input masks in general: http://digitalbush.com/projects/masked-input-plugin/ http://digitalbush.com/projects/masked-input-plugin/
- allbombs 14y agoI like it.. good job
- vlamanna 14y agoThanks! I'll add more stuff very soon.
- dmix 14y agoThe phone one is poor usability. Why is the text indicator half way through the input when it inserts text at the beginning?
- vlamanna 14y agoI agree, I will rework this part. The main challenge was support for IE on this one.
- sbarre 14y agoAlso on the phone part, it falls down if the phone number has an extension. I would work on a way to have the formatting decorators (parentheses, dashes etc) only show up if there is data past that point. So you could include " x" in the event that someone types in an extension or something like that. Properly parsing/formatting phone numbers is harder than you'd think.. How do you specify the mask for different numbering schemes (other regions/countries)? Do you pick one dynamically based on the selected country? Do you have that database of masks-to-country? What if my contact number is international or foreign (even if I pick my country as USA)? Do you let the user select a mask? That feels clunky and more work than just leaving the phone number free-form..
- Kudos 14y agoIt doesn't work with a numpad either. Seems terribly broken overall.
- danellis 14y agoIt also fails on UK phone numbers, because it assumes a London-style number.
- dylanz 14y agoThe phone field would be amazing to have polished, and I think you'd see a lot of adoption for just this field.
- a_m0d 14y ago
- FootballMuse 14y agoPhone number input doesn't work with num keys.
- vlamanna 14y agoYes, it will be fixed. https://github.com/vlamanna/BootstrapFormHelpers/issues/1 https://github.com/vlamanna/BootstrapFormHelpers/issues/1
- FootballMuse 14y agoArrow keys don't allow moving the cursor
- vlamanna 14y agoWill fix it. https://github.com/vlamanna/BootstrapFormHelpers/issues/3 https://github.com/vlamanna/BootstrapFormHelpers/issues/3
- farhanpatel 14y agoI use select2 with bootstrap http://ivaynberg.github.com/select2/ http://ivaynberg.github.com/select2/ works impressively well for using inside forms.
- vlamanna 14y agoThat looks cool!
- arvinjoar 14y agoI saw this on HN at some point but forgot to bookmark/save it in some way, I think it's really awesome. As a Swede I always have to select the box and type "S" a lot of times to get to "Sweden", I'd rather just type in "Swe" like you can do with this. :)
- TylerE 14y agoT and scroll up a couple ;)
- jasdeepsingh 14y agoThis is really very impressive! Loved it!
- vailripper 14y agoIndeed! I just switched over to select2 from Chosen yesterday. The excellent UI of Chosen, but with a MUCH better API.
- mikegirouard 14y agoHow does states work? Does it support territories outside the US?
- vlamanna 14y agoYes, it has the states/provinces/territories of all countries.
- kristiandupont 14y agoThis might be a good place to remind you that if you are dealing with international customers, don't make "state" a required field.
- nolok 14y agoOr make that much assumptions about their phone numbers
- nodesocket 14y agoAwesome. I took the effort and found all timezones across the world and put them into a select for http://commando.io http://commando.io. Would be cool to have a Bootstrap plugin for this. Here is the select HTML markup. https://gist.github.com/3919205 https://gist.github.com/3919205
- vlamanna 14y agoThat's a really good idea. Will do it. https://github.com/vlamanna/BootstrapFormHelpers/issues/5 https://github.com/vlamanna/BootstrapFormHelpers/issues/5
- rada 14y agoI appreciate the effort but your list is just plain wrong. 1. It's not "all timezones across the world" but rather Windows time zones from a particular version of Windows. Most people use the much more accurate Olson database that actually gives you correct time offsets, daylight savings rules, etc. 2. Your option values, i.e. offsets, are either meaningless, or if someone actually uses them, erroneous. For example, current UTC is 17:40 but current Central is 12:40 not 11:40. Again, use the Olson database if you want better time conversions - Windows offset numbers are just a part of the timezone name, not an actual offset. 3. Timezone names differ depending on the language settings on your PC, and your list is only a small EN subset of the time zones, which, given the international nature of the list, is not very useful. If your users are in a non-American time zone, it is very likely that their time zone name is not on your list. 4. Timezone names differ from version to version, and are not backward compatible. Your list is only correct for whatever version you collected it on so it should be identified as such. Even better, if someone actually needs Windows timezones - like I said above, most likely you need the Olson timezones - they should take them from the source, by running the tzutil utility, or from microsoft.com. Your list should be identified as what it is, a list of Windows time zones, (?) OS version. Even then, it's dangerous that whoever stumbles upon it will use the offsets for time conversions.
- nodesocket 14y agoActually, I got the timezones from WikiPedia (http://en.wikipedia.org/wiki/Time_zone http://en.wikipedia.org/wiki/Time_zone) not Windows. I manually went through the WikiPedia list and built up the list. Then I have a checkbox; is daylight savings [ ]. The name list is just one or two major cities. The assumption is users know their offset. I appreciate your comments thought.
- Timmy_C 14y agoI'm impressed with how responsive the author has been in the comments here. It seems like each concern is met with a reply and even some times he creates an issue item for it in Github. Nice work!
- vlamanna 14y agoThanks! I hope this open source project will help people build better forms.
- vipinsahu 14y agoFree Twitter bootstrap magento template http://webkul.com/blog/twitter-bootstrap-magento-template/ http://webkul.com/blog/twitter-bootstrap-magento-template/
- pyritschard 14y agoa good candidate for http://bootsnipp.com http://bootsnipp.com
- wolfparade 14y agoAdd address validation using google maps api. I will love you.
- nachteilig 14y agoIt's really pretty cool that bootstrap has spawned such a tertiary market for addons. I knew it was the real deal when I actually paid for a theme rather than writing the css myself!
- bdreadz 14y agoPosted a couple issues regarding the phone field on github. Would like to use this on a current project. It's a great start and look forward to it just getting a little further down the road.