We thought that as less data we required at registration process, the easiest for the user and more probably they complete the process, but some times you want to ask for some useful information at that stage. For that reason we’ve create a plugin but which main goal is to be used as a base or example for more complex registration process. The plugin will make you able to make any field required.
How does it works?
The plugin will include the plugin’s file form.php in the middle of the current form. form.php has the new fields and rules, some of them are commented (disabled) as an example. Feel free to modify the file form.php to suit your needs.
Download the plugin from Osclass’ sourceforge page
- Validation is driven by Jquery Validation plugin, so more complex validation could be used
- You could make any field optional if you enable it at the form, but the validation remains disabled
- You can not validate a field that does not exists (common sense)
- Minimum HTML/JS knowledge is required
- index.php should NOT be modified, fields and rules are located in form.php and there’s no need to modify index.php (unless you want to add your own extra fields, but that’s more complicated since you need to create new tables and methods)
- Some modifications should be done to user-register.php file in your theme in order to display everything correctly <?php osc_run_hook(‘user_register_form’) ; ?> should be placed before the recaptcha line and <?php UserForm::js_validation() ; ?> should be placed anywhere before the hook.