Advertisement:

Author Topic: RequiredReg fail for Country, Region, City  (Read 1381 times)

SamBot

  • Newbie
  • *
  • Posts: 23
RequiredReg fail for Country, Region, City
« on: March 12, 2014, 01:27:39 am »
Hello,

New to Osclass but getting the hang of it. I have some issues with the RequiredReg plugin. I want Country, Region and City to be mandatory upon user registration. I removed all comments of these fields from the file form.php.
On the registration form I now see these 3 fields. I also removed the comment from
Code: [Select]
<?php UserForm::location_javascript(); ?> in order to make sure the fields are shown as dropdown.

Selecting the country works
After selecting the country the other 2 fields change into dropboxes (bit to small though compared to other fields.). Region shows all regions and selection can be done.
The list for City stay empty at all times.

If I comment out the Country field then it works for Region and City but that might be because only 1 country configured at the moment.


Any help is appreciated to solve this issue. Please find the fields below.
I also tried to to change array() into osc_get_regions() and same for the cities but this leads to script errors when opening the page.

Code: [Select]
<label for="country"><?php _e('Country''modern') ; ?> *</label>
<?php UserForm::country_select(osc_get_countries()) ; ?>
<br />

<label for="region"><?php _e('Region''modern') ; ?> *</label>
<?php UserForm::region_select(array()) ; ?>
<br />

<label for="city"><?php _e('City''modern') ; ?> *</label>
<?php UserForm::city_select(array()) ; ?>
<br />


P.S. Would not mind changing the user-register.php within the Theme but need the correct code to do it. Tried some options but failed in the same way.

So in short: HELP, please.