This is not a suggestion to use S2member – there are other ways to add custom fields. I am NOT an expert on S2member. This is purely my observations to assist people using S2member and wanting to report on the data using amr-users to avoid having to code their own lists.
Play around with the S2member various options and their interaction with amr-users. See what works for you.
For S2Member support, please contact S2Member.
- S2member allows one to create additional user fields for profile or registration
- S2member stores ALL it’s custom fields in one user meta record. This makes it difficult to query or filter based on the values if not using amr-users.
- amr-users will list the values that S2 members stores for a field, not the labels.
- One can either setup field types and their values to control the output (see radio buttons for most control over values) OR
- one can get technical and write a filter or pluggable function to format the data when listed
Choosing field types and values
- S2member multi option boolean (on/off) fields are stored as “on” by their existence (not with a true/false as per other radio button fields)
- amr-users can access S2members ‘plain’ fields fairly easily and can list multi option fields – that may be all you need.√
- Filtering single option in own columns or shared column works √
- BUT Filtering S2member multi option fields not so easy.
- Possible to achieve desired data input and listing with filtering using S2member radio button or single checkbox fields inside a S2 ‘section’ instead – avoid the multi option
- either filter in individual columns, √or
- filter in a shared column √
- Only radio buttons allow control of the value stored in the DB and hence the value displayed in amr-users.
- If you don’t want boolean values to show in amr-users, either use
- radio buttons – one field for each value you want to display
- or get technical (only for people with good php skills) to control the formmating
- or hire me
S2member example configuration
- sample data :
- Service types to be recorded. User can have one, many or none of the values:
- lift passes,
- 3 representations explored (chosen for the resulting data representation)
- a multi option (select or checkbox similar)
- single checkboxes in a section
- radio buttons in a section
Note that the option values are entered and what will be listed
In the User Profile (note 3 different options displayed for same data):
In a simple amr users list
Or combine fields into one column!
Combine the 3 values into one column, to achieve similar look as the dropdown multi option
amr-users configuration for shared column:
- Give them all decimal “x.y” display orders where they all have the same x values
- Edit the headings to make it look nicer
- filtering requires the amr-users-plus plugin (v 2.0 about to go up)
- filter in separate columns (“column values” or “column empty or not”)
- filter in shared columns (“field values”)
What do we want
(and when do we want it!)
Filtering in the reporting view (and/or on the front end):
Filtering with blanks/no blanks only
Why the multi option does NOT work so well
(one can only filter on combinations)
Filter configuration for fields in separate columns
Filter configuration for shared columns (multiple fields in one column)
Collect and show country of residence, using a controlled list of countries
- each user has one country code
- consider using a radio button, listing all the possible countries. then you can control the value stored and displayed.
Collect and show possible multiple countries in which user operates, using country codes, not boolean values
- each user can have multiple country codes
- either use multiple separate radio button fields
- operates in canada/n, operates in US/n etc where the positive values are Canada, US etc
- OR a single checkbox and reformat the displayed boolean to show country code based on field name (complex)
For the more technical:
Filters and pluggable functions exist for further customising. EG:
- want the boolean ’1′s to show as a translateable ‘Yes’ , or as the label value ?
- want to dig deeper into the S2 multi options yourself and do your own processing ? See how the other add-ons work
How S2 stores their data for examples above
- “Life passes”
- “Ski rental”
- “rental2″ => “1″
- “activities2″ =>”1″
Multiple Radio Buttons
- “Lift passes” =>”Lift passes”;
- “No lift passes” => ””;
- “Activities” =>”Activities”;
- “No Activities” =>””;
- “Rental”=> “Rental”
- “No rental”=> “”