Categories
Opinion

Using HTML5 form types

Note: This one gets a little ranty.

One of the earlier things I learned how to use in html5 was form types. This sounds really complicated, but it’s actually really easy (that’s why I get so worked up about this).

When these should be used

When creating a form, at least one of those input’s is an email, phone number or zip code. It is really easy to mark these as email, and phone, and zip it not quite as obvious, but still easy. Why do this? Because if you are on a mobile device, the device will pull up a number pad, or an email keyboard (with @ and .com/.edu).

Here is how easy it is

Email

<input type="email">

URL

<input type="url">

Telephone

<input type="tel">

Zip is a little more complex

<input type="text" pattern="[0-9]*">

“I can’t use those! I have to support IE8?”

Sidenote: I personally think it doesn’t greatly deteriorate the user experience if you don’t polyfill, but ideally you want to. I realize this adds complexity to implementing these, but if you are taking the time, it is definitely worth it.

If an input is <input type="blahblah"> or a type that the browser doesn’t understand, the input defaults back to text. If you want them to work flawlessly in other browsers, you can progressively enhance these inputs.

“Date” is the one that I can understand why developers wouldn’t want to use

Date support in browsers is a little dodgy and has some pretty ugly date-pickers. It takes a little more work but is worth loading in jQuery UI’s date-picker for the non-supported browsers. This is one type that can’t really go without a polyfill. Chris Coyier explains this well in the progressive enhancing post.

Why does this drive me bonkers?

When I fill out a form on my phone, I really appreciate the experience of a proper keyboard. And as a developer I know it’s as easy as changing the word “text” to “email” or “tel”.

I’m writing this post to get the change the misconception that html5 forms are difficult. I totally get why this exists. There are lots of html5/css3 techniques out there that are either difficult to implement, or hard to polyfill for older browsers, so we are hesitant to use them. HTML5 forms are not one of these. They are super easy and enhance, at the very least, the mobile experience. Oh, and did I mention you get free form validation in supported browsers?

Categories
Links of Interest

Article Roundup for 04.4.13

Categories
Monthly Updates

Monthly Update

I’ve seen a few people do monthly blog posts (Chris Coyier, Tim Smith) to give updates on what they’ve been doing and I thought this would be a good idea for me as well. I’ll keep these to just Web Development and not much personal stuff. So let’s do this thang!

Sharing Code

While working on a freelance project, I came up with a cool navigation pattern with css transforms and plopped it up on codepen. Turns out I had over 1,100 views and a lot of hearts, including the man himself, Chris Coyier.

Check out this Pen!

Freelance Client

I’m also working on a freelance site for a local distributer here in Oklahoma. Once the site is done, I’ll be sure to post a link here. Again, I’m using inuit.css and responsive, so it’s been a lot of fun really honing my responsive skills on these sites.

Resdesigning RyanTvenge.com

I’m ashamed to admit that my site is not responsive. Rather than continuing to put it off any longer, I’m now in the process of redesigning my site. I’ve decided to use inuit.css for my css framework and it’s been really fun so far! It’s much more object-oriented css, so it’s still a little weird adding a html around an element to get it to flow into the grid, but I’m loving this new change. Sure makes responsive a lot easier to work with.

You can check out my static, in-process mockup if you want to see what’s in store. Disclaimer: I still have a lot of tweaking to do with the css and need to get it into WordPress after that.

WordPress Talk

One of my goals for the year is to get more involved with the Web Development community and I thought a good start would be sharing my knowledge. I spoke at our local OKC WordPress Meetup this last month about Custom Post Types and it was a lot of fun. It was very gratifying to teach people some cool stuff and to give back a little. I plan on continuing these talks as it increases my knowledge and level’s up my speaking skills (they kinda need some work 🙂 ). You can check out the slides that I posted.

Article Roundups

I’m continuing to the article roundup posts, which has really kept me plugged in to the industry. I’m starting to use Twitter again, which is another way to find those great articles. You can follow me @rtvenge.

Name for these posts

I’m still trying to come up with a unique name for these posts. Maybe that will be rounded out in the second episode.

Categories
Meetup Talks

Custom Post Type Talk

It was a lot of fun to talk at the WordPress Meetup in Edmond, OK tonight. I thought I’d share some of the notes and slides from the talk:

Links of Interest

I had been asked about what I use for local development. Here are some links to local development as well as some other CPT links:

Slides

I’ve also uploaded my slides for your viewing convenience.

If you have any questions about Custom Post Types and WordPress, just drop me a line on twitter or my website.

Categories
Links of Interest

Article Roundup for 03.15.13

Tvenge Design