Archives

Welcome to the archives. To find what you are looking for you can use the search box, view all the articles below or find articles with certain tags.

Displaying a From Field Depending on Previous Question using jQuery

Written on 07/01/11 • 1 Comments

Sometimes forms on websites can look daunting to users when there are lots of fields to fill out. A neat solution is to hide fields that are only required depending on a previous answer. In the example I have created suppose you have a form with a drop-down list of peoples titles we have all the usual titles included but what if a Professor filled out the form? We add another fields to the form for 'other' that only needs filling out if the correct title was not available in our drop-down. 99% of people filling out the form will not need to use this field so with a little bit if Javascript magic we can hide the field unless a user selects 'other' from the drop-down. This approach gives us much neater form for users who have Javascript enabled and will degrade nicely for those few who don't.

Continue Reading

Page 1 of 1 pages

Save a massive 36% on a subscription to .net magazine!

We love .net magazine (known as "Practical Web Design" outside the UK) and have teamed up with Future Publishing to get our readers up to a massive 36% off a years subscription.