Multiple Selection Checkboxes

multi-check.fwWith the new wpmem_register_form_rows filter hook introduced in 2.9, the process of dealing with multiple selection checkboxes becomes far less complicated than previously.

The previous method involved adding each checkbox as a field, and then all of the extra code we needed to handle multiple fields as one both for storing the data, handling user updates, and also in emailing admin notifications.

But 2.9 allows us to filter the rows directly in the array of rows and insert the extra html we need for this. That means you only need to create one field in the fields manager which makes handling the data much easier on the backend.  I’ve even made the code snippets nearly cut-and-paste.  In most cases, you should only need to specify the name for the checkbox group and the labels/checked values.  [Read more...]

Request additional data fields on a specific page

This particular example is a generic tutorial for requesting additional data fields in the registration form on a specific page. Since these are fields that do not show up in the regular registration form, we need to also present the data to logged in users to add this data.

While conceptually this is not an overly complicated process, the practical implementation has quite a few steps, so I will try to explain each step in the process while giving that particular code snippet being discussed at that point. [Read more...]

Reset password with just an email address

WP-Members 2.9 introduced some new filter hooks to make customizing the various forms much easier.  If you have set up a previous version of the plugin to allow password resets with just an email address, you probably already know that most form changes of this type required using the php function str_replace.  Version 2.9 has new filter hooks that make this process much simpler.   [Read more...]

Add a Date of Birth Field with Dropdown Selections for Month, Day, and Year

I have received a lot of requests in the past for how to add a set of dropdown selections for date and store it as a single user meta value. This is a great example of using the new wpmem_register_form_rows filter hook, a new hook in 2.9, because we can use a single field in the WP-Members Fields tab for the date of birth to be stored as a single meta and use the filter to quickly change the placeholder field to a trio of dropdowns for date selection.

Note: this example requires a some php work, but like all of the examples here, I have tried to make it as “cut-and-paste ready” as I can.  For many, this will work out of the box.  For some, you may want to change the way the date is assembled and displayed (i.e. DD/MM/YYYY). I’ve tried to comment the code snippet as much as possible so you can follow what is going on.   [Read more...]