User lists and filtering with s2Member fields

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 who want to use amr-users to report on the data.

Play around with the S2member various options and their interaction with amr-users.  See what works for you.   Certain multi choice field types do not work well without assistance because of the S2member choice of data structure.  For those you may  find this addon helpful:

For S2Member support, please contact S2Member.


  • S2member allows one to create additional user fields for profile or registration
  • S2member stores MANY  of it’s custom fields in one user meta record.  This makes it difficult to query or filter based on the values.
  • amr-users will list the values that S2 members stores for a field, not the labels, however one can also get the lables by using the S2 member addon.
  • think carefully about your choice of field ‘codes’ as these are what appear in the csv extract.

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 √
  • If you don’t want boolean values to show in amr-users, either use
    • the amr users S2 member addon
    • radio buttons – one field for each value you want to display

The following example applies if you are not using the amr users plus S2 members addon.

S2member example configuration

  • sample data :
    • Service types to be recorded. User can have one, many or none of the values:
      • lift passes,
      • rentals,
      • activities
  • 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

S2 member example configuration

Option values

Note that the option values are entered and what will be listed

s2member detail with section – note option values

In the User Profile (note 3 different options displayed for same data):

All 3 optons in the user profile

In a simple amr users list

Option 1 the multi dropdown

Using Single Checkboxes (in separate columns, see other option below)

Radio button values

Or combine fields into one column!

Combine the 3 values into one column, to achieve similar look as the dropdown multi option

3 S2m fields combined into one column

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

Putting separate fields into 1 column

Filtering Options

  • 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 checkbox in single column

Filtering with blanks/no blanks only

Filtering with “column empty or not”

Why the multi option does NOT work so well

(one can only filter on combinations)

Without further coding, filters or pluggables, the values are combined. Due to way S2 stores the detail, it is hard to deliver a generic function – a dedicated S2member answer would be required

Filter configuration for fields in separate columns

Configuration of filter with column values in separate columns


Filter configuration for shared columns (multiple fields in one column)

Filtering with field values in a shared column

More examples:

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

Multi Options:

  • “service_type”
    • “Life passes”
    • “Ski rental”
    • “Activities”

Single Checkboxes

  • “rental2”  => “1”
  • “activities2″ =>”1”
  • “liftpass2″=>”1”

Multiple Radio Buttons

  • “Lift passes” =>”Lift passes”;
  • “No lift passes”  => ””;

  • “Activities” =>”Activities”;
  • “No Activities” =>””;

  • “Rental”=> “Rental”
  • “No rental”=> “”


About anmari

the developer at
This entry was posted in amr users plus documentation. Bookmark the permalink.