Page 1 of 1

Strange I have 2 First and Last name fields on reg page.

PostPosted: April 26th, 2011, 1:13 pm
by SuperG
I would like to remove the name fields at the bottom of my reg page ?
and still have the ones at the top of the form .. any tips ?

Thanks - G-
Image

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 26th, 2011, 1:23 pm
by theone
Have you modified your form at all?

I don't have a password confirmation field on my registration pages......(though I certainly want to add it). Is this something that s2member supports?

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 26th, 2011, 1:43 pm
by SuperG
Where do I edit ? Or hide the name fields in s2 member ?

Thanks -G-

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 26th, 2011, 9:23 pm
by Cristián Lávaque
Hi G.

You don't seem to be using the standard registration form. What are you using? Maybe that's where you should be looking at to remove those duplicates.

I hope that helps. :)

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 27th, 2011, 1:43 pm
by SuperG
yeah - I installed Reg Redux with s2- and I really like the app for its password strength indicator -I removed the First Name - Last Name - from Redux and the name fields that are from s2 are still at the bottom .. :(

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 27th, 2011, 4:44 pm
by Cristián Lávaque
I emailed Jason, let's wait for his input. :)

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 1:08 pm
by SuperG
any updates on this issue ?

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 1:18 pm
by Jason Caldwell
Thanks for the great question.
~ and thanks for bringing this to my attention Cristián.

At this time, there is no Hook/Filter to remove those default Fields easily. So the only way to remove the default registration fields, is to make direct code edits. You can remove the First/Last Name fields by editing this file: /s2member/includes/classes/custom-reg-fields.inc.php, at line #329.

Comment these lines out, like this:
Code: Select all
# eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
# do_action ("ws_plugin__s2member_during_custom_registration_fields_before_first_name", get_defined_vars ());
# unset ($__refs, $__v); /* Unset defined __refs, __v. */
# /**/
# echo '<p>' . "\n";
# echo '<label>' . "\n";
# echo '<span>First Name *</span><br />' . "\n";
# echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_custom_reg_field_first_name" id="ws-plugin--s2member-custom-reg-field-first-name" class="ws-plugin--s2member-custom-reg-field" value="' . format_to_edit ($_p["ws_plugin__s2member_custom_reg_field_first_name"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
# echo '</label>' . "\n";
# echo '</p>';
# /**/
# eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
# do_action ("ws_plugin__s2member_during_custom_registration_fields_after_first_name", get_defined_vars ());
# unset ($__refs, $__v); /* Unset defined __refs, __v. */
# /**/
# eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
# do_action ("ws_plugin__s2member_during_custom_registration_fields_before_last_name", get_defined_vars ());
# unset ($__refs, $__v); /* Unset defined __refs, __v. */
# /**/
# echo '<p>' . "\n";
# echo '<label>' . "\n";
# echo '<span>Last Name *</span><br />' . "\n";
# echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_custom_reg_field_last_name" id="ws-plugin--s2member-custom-reg-field-last-name" class="ws-plugin--s2member-custom-reg-field" value="' . format_to_edit ($_p["ws_plugin__s2member_custom_reg_field_last_name"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
# echo '</label>' . "\n";
# echo '</p>';
# /**/
# eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
# do_action ("ws_plugin__s2member_during_custom_registration_fields_after_last_name", get_defined_vars ());
# unset ($__refs, $__v); /* Unset defined __refs, __v. */    

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 4:45 pm
by SuperG
Wow !

Thanks worked like a charm ... :D
I was pulling out my hair trying to find the location of the custom field First Name - Last Name .

Thanks again for taking time out in your busy work schedule ...

Made my Weekend !

-G-

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 4:49 pm
by Jason Caldwell
Very welcome.
Thanks for reporting back.
It is much appreciated.

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 5:23 pm
by Cristián Lávaque
G, as a reminder, keep in mind that you'll have to re-apply this after you update s2Member when new versions come out. ;)

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 7:09 pm
by SuperG
Duoooohhhhh !

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: April 29th, 2011, 8:34 pm
by Cristián Lávaque
SuperG wrote:Duoooohhhhh !


Yeah, because you're editing the file directly instead of using a hook, so when the update happens the file will be replaced with the new one without your edit.

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: May 2nd, 2011, 1:40 pm
by SuperG
ohhh well thats life ! :)

Re: Strange I have 2 First and Last name fields on reg page.

PostPosted: May 3rd, 2011, 1:43 am
by Cristián Lávaque
You said it. :)