latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Edit Profile Front-End – Hard Coded

Home Forums Community Forum Edit Profile Front-End – Hard Coded

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Friday Sep 28th, 2012 at 10:45 am #26847
Danny Albeck
Username: dalbeck

Hello,

So I am looking to make a profile edit page for the front-end, instead of using the built in shortcode provided with S2Member I am looking to hard-code this in a template file due to some restrictions with the shortcode and mixing in fields from one other plugin (members-list). I created this pastebin: http://pastebin.com/VxGrcJbX

I am looking to add in a few custom fields I generated with s2member to my profile edit page as well. I tried calling for example a fax number field by both:

“profile_fax” <– didn't work

and

"ws-plugin–s2member-profile-profile-fax" <– didn't work either.

Based off of my pastebin link is it possible for me to add in a few text fields and text area fields I created in to this template? I alredy defined a fax number in my profile through the back-end of WordPress but its not showing that data in my edit profile template page like the other standard WordPress fields are.

Thanks for any insight.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Saturday Sep 29th, 2012 at 8:07 am #26935

Hi Danny.

So you want to have your profile form allow edits to the custom profile fields created with s2Member, right? [hilite path]Dashboard -› s2Member® -› General Options -› Registration/Profile Fields[/hilite]

Those fields are stored as a serialized array in a single row (per user) in the [hilite mono]usermeta[/hilite] table. That should help understand how to get/update them. You can use the WP functions to deal with the [hilite mono]usermeta[/hilite] entries.

There are a couple functions provided by s2Member that can help get the values, but they don’t update them:
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_s2member_custom_fields()
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field()

You can also look at the s2Member source file for the profile edit form provided by s2Member, to see how it deals with updates to the custom profile fields.

I hope that helps. :)

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.