WebmasterSite.net

required fields (registration birthdate)

Version: 3.3.17
URL:

PrintPrint
locked


required fields (registration birthdate)
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Posts: 42
quote post #1
Posted 05/08/06 - 10:36 AM:

When I set the birthdate as a required field for registration I get a 'you did not complete all of the required fields' although I selected a birthday, a birthmonth and a birthyear. Is the problem that it requires a field named birthdate but the fields are named birthday, birthmonth and birthyear?
Paul
developer
Avatar

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 65
Total Posts: 7610
quote post #2
Posted 05/10/06 - 6:50 PM:

In register.php, move
 if ($_POST['birthmonth']) 
{
$varslist .= ', birthdate, ';
if (strlen($_POST['birthmonth']) == 1) $_POST['birthmonth'] = '0'. $_POST['birthmonth'];
if (strlen($_POST['birthday']) == 1) $_POST['birthday'] = '0'. $_POST['birthday'];
$_POST['birthdate'] = $_POST['birthyear'] .'-'. $_POST['birthmonth'] .'-'. $_POST['birthday'];
$birthdate = $_POST['birthdate'];
if ($_POST['birthmonth'] == 'none') { $birthdate = '0000-00-00'; $_POST['birthdate'] = $birthdate; }
}
to just above
 $requiredmembers = explode(',', $settings->requiredmembers);


Applying for 3.3.18 of course.
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Posts: 42
quote post #3
Posted 05/23/06 - 11:48 PM:

I fixed this manually according your recommendation and it worked fine until I updated to 3.3.18.
It seems like there's an CRLF in the file which my system doesn't recognize. I can't explain this because I don't understand it. But if I delete the CRLF, it works fine again.
 
Search thread for
Download thread as
locked


This thread is closed, so you cannot post a reply.