Jump to content

[Solved] Registration - DoB only mm/yyyy


Recommended Posts

Hi
Bit of an odd request, but can anyone tell me how to add a default value to the 'Day' part of the DoB on the Registration form.
I don't require the day, but need customers to enter their month and year.
I know how to hide the 'Day' field so if I can work out how to set a default value I can leave the rest of the code untouched and get the result I want.

Thanks

Link to comment
Share on other sites

Please change the code as following in /themes/YourSiteTheme/authentication.tpl

Replace this code


-
               {foreach from=$days item=day}
{$day|escape:'htmlall':'UTF-8'}  
               {/foreach}




With this code

            
               {foreach from=$days item=day}
{$day|escape:'htmlall':'UTF-8'}  
               {/foreach}



After change, the day part will be hidden and the default day will be set as 1st day.

Hope this works for you

Link to comment
Share on other sites

I was just looking at this from a different perspective - I'd like to reward customers on their brthdays but not have them balk at submitting too much personal information.

How would I ask for only the day and month - not the year?

I've been looking at this for twenty minutes trying to suss it out for myself but I must be short on coffee.

Link to comment
Share on other sites

I was just looking at this from a different perspective - I'd like to reward customers on their brthdays but not have them balk at submitting too much personal information.

How would I ask for only the day and month - not the year?

I've been looking at this for twenty minutes trying to suss it out for myself but I must be short on coffee.


similar to above:
find 
-
               {foreach from=$years item=year}
{$year|escape:'htmlall':'UTF-8'}  
               {/foreach}



and replace with

               {foreach from=$years item=year}
{$year|escape:'htmlall':'UTF-8'}  
               {/foreach}



not tested but....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...