Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › How to read WP eMembership "Custom Fields Settings" and put them in a variable
- This topic has 8 replies, 3 voices, and was last updated 11 years, 6 months ago by admin.
-
AuthorPosts
-
May 28, 2013 at 1:11 am #9144CactusJackAzMember
I read through the forum and learned quite a deal, but I didn’t see the answer to my question so I need to post the question.
I have a registration form that has the following “Custom Field Settings”. They are set as checkbox values where the person selects the checkbox if they play in the league.
FRIDAY CO-ED SOCCER:
FRIDAY MEN’S SOCCER:
SATURDAY MEN’S SOCCER:
SATURDAY OVER 35:
SUNDAY MEN’S SOCCER:
TUESDAY CO-ED SOCCER:
6V6 SOCCER MEN’S & CO-ED WEDS/FRIDAYS:
KICKBALL :
FLAG FOOTBALL:
I would like to capture the value of this checkbox. For each league “checked” put a value into variable. Then go through a loop thta checks each variable and if it’s true display the standings and schedules for that league. My purpose is to filter out the information on the profile page I’m building to show only relevant information.
May 28, 2013 at 2:19 am #55871adminKeymasterThere is a way to get/retrieve the details of a member using shortcode or PHP code.
Let me know if the examples here helps:
May 28, 2013 at 2:25 am #55872CactusJackAzMemberI think that might do the trick for me, thank you very much for the prompt response.
May 28, 2013 at 9:39 pm #55873CactusJackAzMemberHello;
After doing a series of test I cannot get the shortcode to work. I have not tested the PHP part.
The following works:
[wp_eMember_user_details user_info=”first_name”]
The following DID NOT work:
[wp_eMember_user_details user_info=”city”]
[wp_eMember_user_details user_info=”kickball”]
The “city” variable is one that came with the plug-in so I figured it should work but it didn’t. The “kickball” variable is one that I did under the custom field settings. At first I had “kickball” as a checkbox, but when that didn’t work I switched it to a text field.
I copied and typed it into the page a couple times thinking that maybe something went wrong with the cut and paste method, but that didn’t help.
I’m not 100% sure if I have any add ons to the original plug-in. Do I need to add an extension to get this feature to work?
May 29, 2013 at 2:38 am #55874adminKeymasterI have a feeling there is a bit of capitalization issue going on here.
Is the name of your Custom field “City”? If it is then try the following shortcode and also make sure that this info is filled in for the member profile in question:
[wp_eMember_user_details user_info=”City”]
June 4, 2013 at 2:44 am #55875CactusJackAzMemberUnfortunately I do not think it’s a capitol issue. I focused on “kickball” and tried upper and lower case. Let me provide pictures what I see and trying to do.
Whenever I use the examples in your documentation it works for email, first name, last name, etc… but when I try different variables like your city one it fails. Trying to use your variables first and then move on to the custom one.
Let me provide screen shots in the next day or so.
June 5, 2013 at 2:45 am #55876nurMemberhi, try using the following to show the City:
[wp_eMember_user_details user_info=”address_city”]
This should work.
June 11, 2013 at 5:58 pm #55877CactusJackAzMemberThank you Nur, that worked.
Could that be my issue with the other custom variables? Just grabbing the wrong variable name?
[wp_eMember_user_details user_info=”kickball”]
Other custom fields I have use these field names
Friday co-ed soccer
Friday men’s soccer
Saturday over 35
What file would hold the custom variables so I can see how the system stores them.
Thank you again.
June 12, 2013 at 5:35 am #55878adminKeymasterWe applied an enhancement around custom field section of that shortcode. It should work better now. I sent you an email with the update. Please try it out.
-
AuthorPosts
- You must be logged in to reply to this topic.