Multiple Registration Forms
Posted: January 23rd, 2011, 5:47 pm
Hi there,
First off like to thank for the awesome plugin, I can't believe how well this plugin is made - great job.
I am trying to create a multiple registration area. I noticed that S2member has custom registration fields and have the ability to have these custom fields show up only for certain levels.
I am wondering is it is possible to change this feature from levels to say a custom user meta.
So the fields would show up when a user has a meta type of "renter" or "landlord".
I have so far been able create custom fields with the avialable for "renter" or "landlord" instead of 1,2,3,4,0 or all.
Now I am trying to get them to show up and have found this in custom_reg_fields_inc.php
How would I go about change this to show depending on the words of "renter" or "landlord".
I know this might be a little over the top for a simple question and would be willing to pay or listen to any other ideas for creating 2 seperate registration pages. Each user type has different info to fill out during registration.
Thanks for any help
First off like to thank for the awesome plugin, I can't believe how well this plugin is made - great job.
I am trying to create a multiple registration area. I noticed that S2member has custom registration fields and have the ability to have these custom fields show up only for certain levels.
I am wondering is it is possible to change this feature from levels to say a custom user meta.
So the fields would show up when a user has a meta type of "renter" or "landlord".
I have so far been able create custom fields with the avialable for "renter" or "landlord" instead of 1,2,3,4,0 or all.
Now I am trying to get them to show up and have found this in custom_reg_fields_inc.php
- Code: Select all
if (!function_exists ("ws_plugin__s2member_custom_fields_configured_at_level"))
{
function ws_plugin__s2member_custom_fields_configured_at_level ($_level = "auto-detection")
{
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action ("ws_plugin__s2member_before_custom_fields_configured_at_level", get_defined_vars ());
unset ($__refs, $__v); /* Unset defined __refs, __v. */
/**/
$level = ($_level === "auto-detection") ? ws_plugin__s2member_user_access_level () : $_level;
if ($_level === "auto-detection" && $level < 0 && preg_match ("/^[1-4](\:|$)([a-z_0-9,]+)?(\:)?([0-9]+ [A-Z])?$/", ($cookie = ws_plugin__s2member_decrypt ($_COOKIE["s2member_level"]))))
list ($level) = preg_split ("/\:/", $cookie, 3);
/**/
$level = (!is_numeric ($level) || $level < 0) ? 0 : $level; /* Always default to Level #0. */
/**/
if (is_numeric ($level) && $level >= 0 && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
{
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
if ($field["levels"] === "all" || in_array ($level, preg_split ("/[;,]+/", preg_replace ("/[^0-9,]/", "", $field["levels"]))))
$configured[] = $field["id"]; /* Add this to the array. */
}
/**/
return apply_filters ("ws_plugin__s2member_custom_fields_configured_at_level", $configured, get_defined_vars ());
}
}
How would I go about change this to show depending on the words of "renter" or "landlord".
I know this might be a little over the top for a simple question and would be willing to pay or listen to any other ideas for creating 2 seperate registration pages. Each user type has different info to fill out during registration.
Thanks for any help