I need to do the following (I’m using S2 Member Pro) with the registration forms (not profile forms):
- I have two “logical” user types for Level #0 (let’s call them type-A and type-B)
- These two user types get different ccaps set in two different Level #0 forms
(i.e. I’m using the WordPress shortcode for the forms; so just two different versions of the s2 pro forms shortcode each with a different custom ccaps="…" set) - I have a set of custom fields. Some apply to both user types, some only to user type-A, and some only to user type-B
- I’d like to be able to conditionally set which fields are present in the Registration form based on the ccaps that are going to be assigned upon registration using that particular form.
I was hoping that a filter was available like the one that can be used to specify which custom fields to show/hide on the profile form (as seen in this kb article). I was unable to find anything in the codex.
I dug into the code for the registration template and see that it doesn’t provide any filters like the profile form for showing/hiding custom fields; so it looks as though I’m out of luck doing this an easy way (you know, without having to add a filter and modify the core s2 member files).
Is there a best practice to implement what I need? Am I stuck creating two separate form templates for each user type and then directing users of each type to the custom template forms? Or is there an easier way?