I don’t use this plugin for a while, don’t you need to customize the shortcode for each form, one should be role=”student” and the other one role=”employer”.
You can also use the filter
add_filter( 'simplr_validate_form', 'my_simplr_validate_form', 10, 3 );
A simple example, assuming the page for the registration is 1 for the student and 2 for employers, in functions.php :
add_filter( 'simplr_validate_form', 'my_simplr_validate_form', 10, 3 );
function my_simplr_validate_form($errors, $data, $atts){
if(is_page(1)){
$role="student";
}
elseif(is_page(2)){
$role="employer";
}
else{
$role = get_post_meta(get_the_ID(), 'simplr_role_lock', true);
}
$atts['role'] = $role;
return $atts;
}
For an eventually error message, that because the post(page) meta key “simplr_role_lock” does not match with the choosen role. So, you can try to unset $errors
add_filter( 'simplr_validate_form', 'my_simplr_no_errors', 10, 3 );
function my_simplr_no_errors($errors, $data, $atts){
if(is_page(1) || is_page(2)){
unset $errors;
}
return $errors;
}
Be carefull : Untested !!!