Webmastersite.net
Register Log In

required fields (registration birthdate)

Comments on required fields (registration birthdate)

rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted May 08, 2006 - 11: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

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

Total Topics: 61
Total Comments: 7868
Paul
Posted May 10, 2006 - 7: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 Comments: 42
rolij
Posted May 24, 2006 - 12:48 AM:

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
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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