Tech Support: 916-358-7368  |  Remote Support |

Moodle – Removing Country field from New User Registration Page

We needed to customize the New User Registration form on our Moodle installation to remove the Country field. This process below can be used for any of the default fields on the new user signup form.

You’ll need access to the PHP files on your Moodle installation.

The file to edit is /moodle/login/signup_form.php.

Simply comment out the lines that add the Country field.

Below you’ll see the PHP comment “double slash” that I’ve placed in front of both lines of code.

$country = get_string_manager()->get_list_of_countries();
$default_country[''] = get_string('selectacountry');
$country = array_merge($default_country, $country);

// $mform->addElement('select', 'country', get_string('country'), $country);
// $mform->addRule('country', get_string('missingcountry'), 'required', null, 'server');

Who is 916networks

916 Networks supports small to medium size businesses in the Sacramento Region. Servicing all industries since 2009, 916 Networks is trustworthy, knowledgeable and reliable and takes pride in honest work at honest prices.

Leave a Reply