To add a new field, check the box marked Add Field and complete the details for the new field.
Parameters for all fields:
- Field Label – this is what displays on the form
- Option Name – name this will be stored as in the user_meta table (spaces not allowed)
- Field Type – currently support text, textarea, and checkbox
- Display – check this box if the field is to be used in registration form
- Required – check this box if the field is a required field
Parameters for checkboxes:
- Value – this is the value of the field if the box is checked
- Checked by default – this will cause the checkbox to display as checked
Parameters for dropdown list:
Dropdown support was added in 2.6.3 and in 2.7 this was added to the Field Management panel. If you add a dropdown list field, you must specify the values for the list items in the dropdown in the box provided. This list should be provided in the following format:
The Displayed Text|the_stored_value,
- “The Displayed Text” is the text that will display in the dropdown list to the user.
- The pipe charatcer ( | ) is used to separate the displayed menu item from the stored value.
- “the_stored_value” is the value that will be stored in the database if the user selects this item.
- A comma must separate this list item from the next item in the list (no comma is needed after the last item).
These parameters account for a couple of extra features. For example, if you want the list to start with something such as <–SELECT ONE–> but that this is not a selectable value itself, put the displayed menu item, followed by the pipe separator, and then a comma like this:
<–SELECT ONE–>|,
Alternatively, if you want a blank line as a separator between a group of menu items, simply use the pipe separator followed by a comma.
NOTE: if you add a password field, you MUST set this as both a displayed and a required field.
Once you have entered parameters for the new field and checked the Add Field box, click Update Fields to update the field list with the new field. If your new field is not displayed in the list, it did not update.
Joe Greenwood says
Hey Chad, is there a way to edit a field once it’s been added? I need to change some text in the field label. For now I suppose I’ll jump into the database and edit there. Thanks!
Joe Greenwood says
Oh I guess I can’t really edit the database table .. whenever I make a change to the ‘wpmembers_fields’ in options table, I break the registration form.
Okay so my next question … if I remove that custom field and create a new one with the same option name, will the new one pick up where the old one left off, so to speak? This field is a checkbox for opt-ins to our email marketing … I need to sort users later by checked and unchecked.
I think this will work because the value of option name is getting stored in wpmembers_fields … so yeah, that’s what I’ll do. Thanks!
Amy says
hey Chad,
I am using your plugin but the fields are showing up twice. Would love your advice on how to resolve that. I had installed and uninstalled once before getting this to show up and work with captcha. Would love your help.
Thanks!
Robert says
Hi Chad,
I just added a bunch of options and noticed that quotes are shown escaped in the field label and dropdown options. I’ll be digging into your code to address that, but if you could point me in the right direction I’d appreciate it.
Thanks,
Robert
Chad says
I’ll get it addressed. don’t know off the top of my head where updates will need to be, but I’m preparing a cleanup update 2.7.3 anyway, so this will fit into that process.
Robert says
Hi Chad,
I was able to resolve this issue by adding stripslashes to the us_option value on line 558 of wp-members-admin.php and adding a line to stripslashes from the $str value in the option section (lines 569-576). This is because the wordpress “update_option” function you are using already escapes the values, so this ensures it doesn’t happen twice.
On a related note, I wanted to add income ranges as option values using commas a thousands separators (like $25,000) but your code separates the option values on commas so the results were off. I changed your explode function to use ||| as the array value delimiter instead of comma in order to allow commas in the option names and values.
Regards,
Robert
Amy says
Robert,
I could use some help in wordpress tweaks – such as integrating the Facebook/Twitter API to dump in the database. I am far less technical and work on the front end. You seem knowledgeble on the coding side. Are you available for freelance work in future?
🙂
Robert says
Sure Amy, you can contact me at http://www.businesscatalyst.info/contacts.php.
Thaynner Bastos says
I would like to know how to display the fields added to a particular page.
I tried to use the the_author_meta (‘field name created’) but failed.
Jane says
Can you let me know if there is a way to edit fields once they are added to the “manage fields” page?
This would be a very helpful feature.
Chad says
That all depends on what your objective is. There are a few possibilities.
You can use get_user_meta to display the user meta fields. But most likely you’ll need to do this at the template level. To use this, you need a basic understanding of php and WP functions.
WP-Members does have a “field” shortcode, but I’m not sure that’s what you are looking for (but just in case, I’ll explain it anyway). The field shortcode can be used to display any of the user’s registration fields in a page. (Note: this is the data for the user who is logged in.) The use of the shortcode is [wp-members field=”option_name”] where option_name is the corresponding Option Name from the list of WP-Members fields.
Chad says
There is not at this time. The reason is that, except in the case of a dropdown, it is actually easier to just recreate a field rather than edit an existing one.
Soosie says
Hi Chad
Is it possible to add an automatic reguistration date field? I know how to add an extra field but I would like it to have a defaulkt vaklue of the current date.
CHeers Soosie
Chad says
If what you are asking is to get the timestamp and date of a user’s registration, that’s already there. It is stored in the wp_users table.
Soosie says
Thanks Chad for being so patient with us newbies. I’ll figure out how to access it.
Cheers Soosie
Xendo says
Hi,
thanks for your plugin.
Is it possible to add a field to let the user choose between different roles I set up?
I think I should use the dropdown select, but I wonder whether there’s a way to get the values from the existing one and updating that specific field in the database.
Thanks again
Chad says
You could add that as a field, but depending on how you manage roles, you may need to include an intermediary step to sync up the two processes. If that is the case, you could probably do that using the wpmem_post_register_data hook. At that point, the user is registered as far as WP-Members and WordPress are concerned and the data is loaded into the database (wp_users and wp_usermeta tables). Using that hook, you could look at the usermeta that you are using for the user to set their role and then add whatever value the outside process needs.
albert says
Hi Chad! I’m wonder if there’s any possibility to set up 2 “checkbox” fields that you only can select one, for example to fields with no possibility to be both selected at the same time, for example to choose Male or Female. I was thinking in do it with dropdown menu but I can’t because the name are too long and I need to add a link to each field to read some Terms and Conditions on each… so needs to be two checkbox fields. Do you know what I mean? Thanks!!
Chad says
Actually, what you need are radio buttons. Unfortunately, there is not support for that in the plugin at this point. It’s something I’ve thought about, but haven’t had the time to build in at this point. There are a couple possibilities with the current plugin, however that would allow you to so some customization for something like that. How knowledgeable are you with php?
Steve says
Hi Chad, thanks for producing this plug-in. I need to make a few simple changes and I can send you the code once done if you wish. I simply need to add a “multi-select” field. If you can point me in the right direction, I’d appreciate it.
Thanks
Chad says
Making changes in order to support another field type wouldn’t be a simple change. However, there is a very simple approach to this with a new filter hook that I haven’t really documented yet. If you are confident enough with php to be able to update the plugin in that way, then you’ll certainly be able to use the filter – and that will be not just simpler, but also compatible with upgrades.
The plugin builds the form as a string of html. Before that is sent to the browser, it applies the filter wpmem_register_form. My suggestion would be to create the field you want as a regular input field, then use the browser to take a look at the generated source. Build a filter to use str_replace to put your multi-select html in the place of the regular input field (of obviously the same name).
Let’s say you had a field for choosing what type of autos the user has owned and the option name of that field is “cars”. You had set it up as a regular input text type in the plugin field manager. You’ll apply this filter (like any other WP filter hook, this would go in your functions.php file):
Now this is just random example. My html syntax might be off, but the php should be ok. I’m really just trying to give a conceptual example.
Deeps says
Hello Chad,
wp-members is nice Plugin.
I am using this plugin in my project , I can add many other Field using different Field Type like text,textarea,dropdown etc.
now I want to add Upload resume filed in my Registration form so that, I need Field Type is “file”, how can i add in my Registration form.
thanks in advances.
Chad says
There is no upload support in the plugin.
Steve says
Thanks for your reply Chad. I pretty much finished adding the multi-select field option by reverse engineering your code. I’m interested in adding a file upload field to be used as a member picture. I’m wondering how much you’d charge me to do this? I’m assuming you have access to my email address… thanks
aaron enabs says
Hi,
I seem to be having issues using WP-members i have adjusted the width in the wp-members.css but the text does not seem to be aligned with the names
eg username [ textarea] comes up with *required field rather than the [ textarea].
it skips a line and the username textbox jumps to the firstname text box.
How can i resolve this?
Thanks
Aaron
aaron enabs says
Hi My issue has been resolved.
Thanks
vishnu says
I need to add the radio buttons in the form
how can i do it
Chad says
The registration form does not support radio groups at this time.
Jurgen says
Morning
I use your plugg in as a registration form. Great!
I just would like to be some parts of the registration visible to other members.
When they register they most mention if the have a f-dog, a cat etc.. The other members must be able to see who has a dog or a cat.. help….
I now use “member list” to show the members but it seems not to be working together…
JVP says
This is a great plugin! I’m using it for registering users on my site, but i want to know if is there any way to get the information of registered user, i ask for that because i’m using an external database used for a license program server, and i need to show to the user some information about the state of their software obtained from the external database.
On the registration, i’ve added the product key that a user have to fill with their own key. When a user access to their member area, i want to call to the external database and get all the information about the user product status: activated/deactivated, last date used, remaining days of the product key, …
Thanks in advance!
Chad says
There’s not really a way to do this internally in the plugin. However, you could use get_user_meta to pull the values for any of the meta fields for a given user.
Chad says
The answer would depend on how you want to get the information of a registered user. There are several WordPress functions to do this (start with get_user_meta) The WordPress Codex is a treasure trove of information on this.
Alternatively, if you are doing this external to WordPress, such as with a MySQL script, or direct access to the database, it is helpful to understand the relationship of wp_users and wp_usermeta (also found in the Codex). All of the additional fields in WP-Members that are not WP native fields would be found in the wp_usermeta table. Username and email will be found in the wp_users table (as will the user ID primary key to find the meta field value).
JVP says
Thank you! wp_usermeta table is what i need. Thank you so much!
Tania says
Hi there- great plug-in. Really nice work. I’m using it as a way of gettin people to register in order to view video content on my site and it works a treat.
The thing is now, I have a group of e-newsletters (one for general news, one for sports, one for business news), and I would like to add a field to the registration form which allows users to select more than one of those (they may want to receive them all). Is there a way to do this?
Thanks again
Chad says
I would suggest adding a checkbox for each (which can be added in the plugin’s fields tab) as you can select checkboxes individually (as in the case of selecting one, some, or all).
Jijai says
I have a custom field, a dropdown to be specific containing the options yes and no for the users to select if they want to subscribe to our newsletter. How can I make it work that if they opt to subscribe they will be added to the list in my mailchimp. Currently I have to separate lists for subscribers who wants our newsletter and the other one who is for members only.
Chad says
I would suggest playing around with the action hooks wpmem_post_register_data and wpmem_post_update_data. These come just after a user is registered and just after a user updates their registration data. You could write a function to subscribe/unsubscribe via the MailChimp API hooking in at those points.
evo says
Hi..I just added your members plug-in…firstly fantastic!
Im new to wordpress…have just scrapped my iweb site that was completely customized but required my friend to design and make it all…as it got so complex I was asking to much of him so opted to redesign and create a wordpress site and manage our self myself…from the deep end..so far so good though.
But to this members registration form. It doesn’t properly fit in our wordpress templates given space, please take a look for yourself. Ive tried changing to a portfolio page but that doesn’t work at all and also tried just removing the sid bar as it is now but as you can see that doesnt work either. Any advise you can give, its all so close to perfect, just needs some tweak to make it a little more narrow, please help!
Chad says
The forms are entirely driven by CSS. See this post on working with a custom stylesheet: http://butlerblog.com/2011/07/25/customize-the-wp-members-stylesheet/
Also, there are two additional stylesheets that are included in the download. You can try one of those to use as-is, or as a starting point for customizing.
Ron says
I would be also interested in allowing members to upload their picture or Avatar. If this plugin caters to members, this would a standard function.
Great plugin 🙂
Ron
Carrie Dils says
Hi Chad,
Thanks for the plugin. Quick question on a custom field. I’d like to display it on the WP-Members Users overview screen (Users > WP-Members Users). On the WP Members settings, I have that field set to “display”, but it doesn’t show up on the overview screen. I’ve set all the other fields to NOT display (except username, name, and email) and, true to expectation, they do not display. Not sure why that doesn’t work on a custom field.
Thanks!
Carrie
Chad says
At this point, there is not an upload option within the plugin. There are action and filter hooks available in the registration form and registration process that would allow this to be customized, and also WordPress has gravatar support built-in, so if the user has a gravatar, WP can load that via the user’s email associated with the gravatar.
Chad says
Hmmmm… Not sure why that would be. Is it a field that you added or is it one that was part of the plugin’s default install?
Ron says
You would have to customize the code to get WP-Members to add an Avatar via the WP email script. This is out of reach for the non-coder. You would think a members or membership script would allow the adding of an Avatar without having to create a hook or play with the WP CODEC. This plugin still rocks however missing this function is no fun. 🙁
Regards,
Ron
Chad says
No – I think you misunderstand. WordPress already loads user avatars from gravatar (globally recognized avatar) which are tied to the user’s registered email address. This does not require any coding what-so-ever. Now, if you have some limited coding skills you certainly can do more beyond that by using the get_avatar function which is certainly not out of reach of the non-coder.
There is a good (and simple) example of how this works on my new premium support site. This particular post is free and shows you how to use get_avatar to add a gravatar to the sidebar widget using the wpmem_sidebar_status filter hook.
Carrie Dils says
It’s a field I added – a drop-down list.
Ron says
Hi Chad,
Thank you for these great responses in all of these request – quite helpful.
When you do not want individuals to go into the WP backend, nor use the WP registration routine – you are using ThemeYourLogin – the WordPress profile is no longer available – that is the purpose of using WP-Members is to help brand your own login, lost pass, change profile settings. Why not package this script with the ability to change your avatar? This seems like a natural thing to have set for future development.
Ron
Chad says
That sounds like something I’m going to need to troubleshoot. Unfortunately, I’m not currently in a good location to do that, so it might take me a couple of days to be able review.
carrie says
Thanks, Chad. Let me know if you want a login to my admin dashboard.
Chad says
I will probably be putting something together in the future that includes upload ability because I am getting requests for that.
In the meantime, you might want to learn about gravatars which is what WP uses. There is no need to access your profile or anything on the backend to change your avatar if it is a gravatar. The avatar that is shown is connected to your email address, which if you want to change that, you can do that on the front end via WP-Members.
Mikey says
Hi Chad. I don’t know if this was answered above, but I’m having trouble with the checkbox feature in the field. I want to make it so people can check off a few features. Is there a more organized way than having a bunch of check boxes separately placed? Thanks
-Mikey
Chad says
I think I understand what you are looking for, but no, there’s not really a way to group them together. However, if you have some php skills, you could filter the generated html for the form to manipulate things the way you want using the wpmem_register_form filter hook. See the list of hooks here for more information on this hook.
Jerry Davis says
Chad, I use your wp-members plugin on one of my sites. Just installed it, nice plugin. But I have first and last name as required fields, and the plugin is allowing the users to submit their registrations with no first or last name, no TOS checkbox or Country. These are all required but users are successfully bypassing this important requirement. Will you help me fix this 🙂 ?
Chad says
The plugin is pretty mature in that area, so I would be surprised if it was the plugin letting registrations through. My initial thought would be that if you are using additional plugins for something that also requires registration (such as a forum, or your comments template), these often will by default direct users to the WP registration, which if you have not disabled or redirected that, would not have the same requirements (that’s the most common with the situation you described). Send me a link and I can take a look at it.
Jerry Davis says
Pie registration was interfering, I think. Deactivated pie and that seems to have cleared it up. Nice tool, Chad. Can you modify the subscribers/users list to include a date-joined column? Maybe even a “joined from” to show the page or post they attempted to access when they joined up?
Jerry Davis says
No, it quit again. Very frustrating. I have disabled several other plugins to try and get reliability out of this, and cannot. ———
username: fff
email: info@dmgna.com
First Name:
Last Name:
Country:
TOS:
This user registered here:
user IP:
activate user: http://www.freedom-won.net/wp-admin/user-edit.php?user_id=3014
———————–
So as you can see, it wipes the names and TOS/Country data, plus the IP’s and post of registration. I have the fields checks as defaults and those are stable. Is there a conflicting WP default registration setting that might exist? I’m gonna be digging for a crack-pipe pretty soon 🙂
Chad says
Are you using a cache plugin such as W3 Total Cache or WP Super Cache?
carrie says
Hi Chad,
Was there ever a resolution for this or a possible workaround I can add?
Thanks,
Carrie
Chad says
Actually, it appears that I misread your original question. I thought you were speaking about the User Profile page, but you are actually referring to the User Table.
The User Table fields are not changeable at this time, so the fields that show are the fields that show.
The current version 2.8 project revolves around changes to the admin panels, and it is in the project to make changes to how this table is editable. In the first iteration it will probably be editable via filtering an array of the available fields, with the possibility of adding something via the admin panel later on down the road.
hamed says
Hi Aaron,
Could you tell me how you fixed this problem? I’ve tried editing the registration php without success 🙁
Loving the plugin by Chad; just want a way round this minor issue.
Thanks
hamed says
Ignore the above post please, I edited the wrong php, I’ve now fixed the problem using Chad’s suggestion in reply to the July 29 2012 post by Ed in the comments section of the following post: http://butlerblog.com/2011/07/25/customize-the-wp-members-stylesheet/
Thanks Chad for the fabulous plugin!
Jeff Adams says
Chad, having issues with passwords. Originally setup where the approval email would give password, this relies on correct email and being able to type auto password. There were (are) too many issues with members. I am trying to get the password field setup where the new member adds their password (this part works), and the auto reply email has their username and password (this part doesnt work, the password is blank). Field label, option name and field type are all “password”, display, required, checked are all checked.
Chad says
If you are using moderated registration and user selected passwords, in that particular configuration, you cannot send the password in the user approved email. It has to be sent when the user registers (if you are sending it at all, which you do not have to do since they are setting it themselves).
See: http://rocketgeek.com/plugins/wp-members/users-guide/customizing-emails/email-shortcodes/
Jeff Adams says
Thanks Chad, that will work. I am sending the “thanks for registering” email. Thanks for your quick and accurate response. Great Plugin!
skaap says
how do i edit an existing field that is added.The field is a dropdown list
Rambo says
Hi,
How to add a field like this with a dropdown menu:
the sexes:
a. Male
b. Female
Generate code for me !
Thanks
Jajuli says
hallo,
i’m verry interesrt for this plugin. But, i really need field of upload for photos profile. Please add it to this plugin. I hope it can added in short time, thank you very much
Chad says
There is not presently an editor for fields in the field manager. Prior to adding support for dropdowns, it was just as easy to delete/recreate a field with less back-end programming overhead. However, since adding dropdown support, I do realize there is a need. It will be added at some point during the 2.8 lifecycle. 2.8 is focused on rebuilding the admin of the plugin.
Chad says
There are instructions given in the plugin, or review customizing fields in the Users Guide: http://rocketgeek.com/plugins/wp-members/users-guide/registration/choosing-fields/
Chad says
That’s something that may be added in the future, but at present, it is not a feature. If I do produce a tutorial on how to customize this feature, it would be posted at the plugin’s new support site: http://rocketgeek.com
abhay says
how to add ajax for state and city olease help me…………..
Charlie says
Great plugin, love it but is the a way i can add an upload image on the form? it would make this plugin the tops of the wp plugins, hope this can be done soon, cheers
vita says
is there any way to change the field label of wp native items (eg. last name)?
Chad says
At present there is not a way to do that. In the upcoming 2.8 version, there will be a field editor to edit the values of an existing field. However, this will exclude the WP native fields (and I don’t see implementing a change here as that could spread into problems, i.e. collisions with WP itself, or other plugin integration).
My suggestion would be to implement a custom field with a different label. You could then not use the native field and use the custom one.
Hugo Campos says
Can I create a unique field, like an Id Document Number?
Chad says
You could do that with the wpmem_post_register_data action hook. This hook fires after the registration process has validated (so the user has been inserted at this point). You could add a user meta, although you’d need a way of validating that that number was unique.