How can I set a country selected by default in the Country field?

This can be achieved by changing the default PHP code found in the Values area of the Country field to something like this:

$db = JFactory::getDBO();
$db->setQuery("SELECT name FROM #__rsmembership_countries WHERE name NOT LIKE 'France'");
return "France\n".implode("\n", $db->loadColumn());

Where you should change France, throughout the above script, to the country of your choice.


12 persons found this article helpful.

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Can I auto-populate custom fields ?

Create membership custom fields