ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Registration required fields


  • 2012-10-26 15:31:33

    Registration required fields

    I am trying to make another field (province) REQUIRED in the registration form and even though I have the code similar to the first_name field, the field is not required. It lets me submit with value empty. I am in the registration.tmpl.php file.

    IF I remove the last_name field from this file, I still get the error message that the last_name is required, which tells me that there is another location to indicate required in addition to the coding of the form fields. Do you know where that location for the code is located that indicates these fields are required?

    Lastest version of Atutor, and php. HOsted on linux server
    T

  • 2012-10-29 09:24:31

    Re: Registration required fields

    There are validation checks associated with each required field in registration.php, that will also need to be adjusted. If address is to be required, one of these checks would need to be created for it.

    This what the first name fields validation check looks like. Adjust the values accordingly for "address." Remove or comment out the checks for fields you don't need.

    [php]
    if (!$_POST['first_name']) {
    $missing_fields[] = _AT('first_name');
    }
    [/php]

  • 2012-10-29 09:31:44

    Re: Registration required fields

    I meant, adjust for "province"