w9pigq
1.972K
· May 2013 ·
Affa5b7b3a311fcf5f868859d586b410

Showing and hiding conditional HTML without Javascript

Have you ever filled out an address form that had a checkbox for “my shipping address differs from my mailing address”? When you click that box a conditional form part gets revealed that allows you to enter another address. We had to build something very similar the other day and stumbled on a neat way to make the conditional part show and hide with CSS only.

Here is how:
http://pivotallabs.com/conditional-html-forms-without-javascript/

Sign in or sign up to add your response.

2 Responses

6546
3aecd9e

This technique is really good for drop down menus that should work without JavaScript!

over 1 year ago ·
16012
E683f567 9c43 4feb b52b e9c71a0b4b6d normal

thomaslindstr_m how do I get it to work with drop downs?

over 1 year ago ·