Sign up forms with dates - is there a way not to have default showing?

I have a couple of customers using sign up forms with dates for birthday and wedding anniversary.
The default on the form is 1st Jan 2012.
Is there a way of tweaking the code so a value is not initially shown, eg. a blank or a " - ".
This is because some people might not want to complete this fields and in the case of wedding anniversary not everyone has one!

roshodgekiss roshodgekiss, 5 years ago

Hi Julian, the easiest way to show a blank option by default is to add...

<option value="0" selected>&nbsp;</option>

... to each list of options (ie. day/month/year). When the form is submitted, a blank date value will be submitted if this part of the form isn't filled in.

Note that with year, the current year (2012) already has the selected attribute added, so you'll need to remove this. Let us know how you go :D

Get in touch with us on Twitter:
We're also on Facebook:, 5 years ago

That's great thanks Ros,. Got it working!

Julian Wellings | Expertise on Tap 
Email Marketing | Video Marketing | Cheltenham UK
Follow me on Twitter

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free