It's on a page that just uses the ShortCode [s2Member-Profile /] to display the form. But as usual, you got me thinking about it from another angle, and I figured out the problem.
I am HIDING two fields -- the Username and the DisplayName -- from the form, by using Hooks from s2m's profile-in.inc.php, to insert HTML comments around the rows.
- Code: Select all
add_action('ws_plugin__s2member_during_profile_during_fields_before_username','ideal_hide_start',10);
add_action('ws_plugin__s2member_during_profile_during_fields_after_username','ideal_hide_end',10);
add_action('ws_plugin__s2member_during_profile_during_fields_before_display_name','ideal_hide_start',5);
add_action('ws_plugin__s2member_during_profile_during_fields_after_display_name','ideal_hide_end',5);
function ideal_hide_start ( $vars = array() ) {
echo "<!-- \n";
}
function ideal_hide_end ( $vars = array() ) {
echo " --> \n";
}
In troubleshooting this just now, I found that the hooks are ok, and even inserting a complete html comment (like <!-- test --> ) is ok, but wrapping the TRs as I'm doing it is what breaks the Password Strength Indicator, for some reason.
No big deal, though, since I can use jQuery to hide the TRs instead.
- Code: Select all
// hide fields (the entire <tr>)
jQuery('#ws-plugin--s2member-profile-display-name').parent().parent().parent().hide(); // Display-Name field
jQuery('#ws-plugin--s2member-profile-login').parent().parent().parent().hide(); // Username field