News for hackers. Stuff that matters.
Re:Formly: the form glamorizer for jQuery by rimantas on Wednesday June 01, 2011 @09:29AM (#2607140)
Dear fellow developers, forget that type="reset" exists.
Re:Formly: the form glamorizer for jQuery by mixmax on Wednesday June 01, 2011 @05:22AM (#2606603)
The e-mail regex needs some work - [email protected], which is a valid e-mail address, doesn't validate to true.
Re:Formly: the form glamorizer for jQuery by constant_change on Wednesday June 01, 2011 @07:48AM (#2606851)
Sometimes it's best just not to bother with a regular expression. Email addresses are a prime example of where this is true.
Re:Formly: the form glamorizer for jQuery by gmac on Wednesday June 01, 2011 @08:29AM (#2606964)
This has been discussed to death all over the place, but I think the take home is not to be too clever rather than not to use regexes. I tend to look for 'something at something dot something':

    .+@.+\..+
I believe this allows all valid addresses (as well as lots of invalid ones, obviously). But I'm sure someone will let us know if not. :)
Re:Formly: the form glamorizer for jQuery by ifzen on Wednesday June 01, 2011 @09:51AM (#2607233)
If you REALLY need to validate en email address:

http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html

but again, only if you REALLY, REALLY , REALLY want to.

Re:Formly: the form glamorizer for jQuery by pspeter3 on Wednesday June 01, 2011 @11:33AM (#2607709)
That's ridiculous and awesome. I'm glad regular expressions exist so we can make garbage/magic like that
Re:Formly: the form glamorizer for jQuery by pavel_lishin on Wednesday June 01, 2011 @05:50PM (#2609518)
For a second, I thought it was a perl script.
Re:Formly: the form glamorizer for jQuery by mquander on Wednesday June 01, 2011 @09:49AM (#2607225)
Obvious counterexample: me@localhost. (Not that this is a useful counterexample in the context of a form submission.)
Re:Formly: the form glamorizer for jQuery by lpolovets on Wednesday June 01, 2011 @11:38AM (#2607743)
http://fightingforalostcause.net/misc/2006/compare-email-reg... is a good site that has a number of email regex variants and how well they do on various email address formats.
Re:Formly: the form glamorizer for jQuery by freddier on Wednesday June 01, 2011 @06:17AM (#2606689)
Shouldn't the placeholder text use the standard "placeholder" attribute of HTML5 instead of the "place" I'm seeing in the examples?
Re:Formly: the form glamorizer for jQuery by andos on Wednesday June 01, 2011 @06:40AM (#2606721)
Yes. And the other commands that do not map to an HTML5 construct should be "data-" attributes.
Re:Formly: the form glamorizer for jQuery by risratorn on Wednesday June 01, 2011 @08:53AM (#2607029)
And he clearly never heard of field labels :) But all together it's a nice script, yet not really standards or accessibility compliant.
Re:Formly: the form glamorizer for jQuery by RyanMcGreal on Wednesday June 01, 2011 @10:20AM (#2607344)
Nitpick: clicking on the text related to a checkbox or radio button should activate that form element (via the `label` element).
Re:Formly: the form glamorizer for jQuery by MartinCron on Wednesday June 01, 2011 @11:21AM (#2607639)
That's not a nitpick, that's a big fucking deal.
Re:Formly: the form glamorizer for jQuery by rdoherty on Wednesday June 01, 2011 @12:12PM (#2607927)
Please please don't put labels inside text fields. Once you've entered information you don't know which field it is, especially after you've filled out the entire form.
Re:Formly: the form glamorizer for jQuery by BerislavLopac on Friday June 03, 2011 @05:47AM (#2615725)
Title attribute, or a custom tooltip, resolves that.
Re:Formly: the form glamorizer for jQuery by kevinholesh on Wednesday June 01, 2011 @11:13AM (#2607607)
I don't think filling in a form online will ever be glamorous. The thing I strive for when designing a form is that it is usable by anyone and instantly recognizable as a form.

This is a great plugin, but consider the consequences of using non-browser-default form elements and the potential to confuse your less technical customers.

Re:Formly: the form glamorizer for jQuery by pasbesoin on Wednesday June 01, 2011 @11:36AM (#2607727)
OT: What's with the recent prevalence of ginormous favicons? (In this case, 300 x 300?) Is there a context where the large size is a benefit? (Tablets?)
Re:Formly: the form glamorizer for jQuery by pavel_lishin on Wednesday June 01, 2011 @05:51PM (#2609524)
I believe that when you bookmark something to an iOS device's desktop, the favicon is the default application icon, so it makes sense to make it big and fancy in that context.