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.

update user custom field w/ other db field

Home Forums Community Forum update user custom field w/ other db field

This topic contains 1 reply, has 2 voices. Last updated by  Devra 4 years, 5 months ago.

Topic Author Topic
Posted: Saturday Jul 14th, 2012 at 11:29 pm #19280

I do not want my user to use the default registration form (needs to be seamless) so I have created a user registration form with gravity forms + user registration add-on. Problem is that I have custom user meta that I’d like for the user to be able to update in their profile form and gravity forms doesn’t have a form option that allows you to change the user info after submission. The user meta key for my “Company” field with Gravity forms is different than the user meta key for my “Company” custom field. So I can either use a registration form through s2member or overwrite the s2member custom field with the gravity forms field.
Is there a s2member registration form that I can use on a page instead of sending the user to the admin registration area (that looks similar to the admin login page)?
Currently my solution is to attempt to overwrite the s2member custom field. I am trying this:
function set_s2_user_company($entry, $form){
global $current_user;
get_currentuserinfo();
$s2comp = get_user_field (“Company”);
if ($s2comp == ”) { update_user_option($current_user->user_ID, ‘acM_s2member_custom_fields’, $entry[‘6’]); }
}
add_action(“gform_after_submission”, “set_s2_user_company”, 10, 2);

The “gform_after_submission” action hook executes after the registration form submission. $entry[‘6’] is the “Company” form field from the registration form.
I realize you aren’t going to support gravity form functionality, but I am looking for advice on how to overwrite/create the s2member custom field in the database from a form submission outside of the s2member forms.
ideally, I could just use the registration form for s2member within a page, since I can already pre-populate my gravity forms with my s2member data.
Please help. Thanks!
check out the site: http://www.envisiondemo.com/acumen

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Wednesday Jul 25th, 2012 at 9:50 am #20202
Devra
Username: devra

I would also be interested in this answer.

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.