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.

updating user custom field w/ other db field

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

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

Topic Author Topic
Posted: Saturday Jul 14th, 2012 at 11:25 pm #19279

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!

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Monday Jul 16th, 2012 at 7:27 am #19343

Hi Stephanie.

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)?

Yes, you can use the free registration pro-form. [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Free Registration Forms[/hilite]

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.