I need custom field to collect members' dates of birth.
However, I know mySQL has a specific format for Date values.
Since I need to calculate who is over a specific age, I'm guessing the format entered has to be in the sql DATE format--to do the math.
BUT, I know the users, and even with a description showing the proper format for the date I'll end up getting one in cuneiform.
So, is there something simple I'm overlooking or should I just go with a simple php/html page and tuck it in it's own table--requiring them to enter the birthdate using the clickable calendar in html?
Just looking for ideas to make it easy on both parties.
1- SMF already has a birth date field as a fixed field in the profile.
2- SMF currently stores the data in that field as SQL type "date" which is yyyy-mm-dd
3. in order to do the same thing with custom profile fields, you would have to have 3 fields (year) (month) (day)
and probably choose a "select box" option...
However, a better choice would be to just change the code a little bit to require the defined birthdate field on registration.
template_profile_birthdate() is in profile.template.php
modify template_registration_form() in registration.template.php
to either add the function call or copy the contents into the reg form
I recall seeing, but I think I may have commented it out, because at the time there was a LOAD of confusion about who could see whose age (please, I get it, I really do).
Anyway, yeah, the custom profile field is the wrong way to go. Too much work.
I made a simple calendar input to start with that works fine and 'views' with the members table when I run a master query-- if I go that way. But, if I can just use the stock birthdate (thanks for confirming it goes to the right date format; i did see that when poking around in the profile.template.) I'd rather go that route.
But, I can't find the registration.template.php--where is that?
profile.template.php looks fine and has nothing that I touched. I'm not sure where I may have commented it out.
I used this mod (https://www.simplemachines.org/community/index.php?topic=500869.msg4118916#msg4118916), however I couldn't figure out how to make it required!?
Did a search and found where I asked about removing that, last year. Found the comment marks to remove and play with it.
oops... I meant register.template.php
All good now.
Marking solved then.