Member Profile Modification - edit one field only
Posted: May 12th, 2011, 3:29 am
I want to do a special version of the Member Profile Modification form, where a member can see and edit ONE particular field ONLY -- one of my Custom Registration Fields (a "User Agreement" checkbox).
Some of my members will have logins they did not get by using the payment form, where paying customers had to click a checkbox to indicate acceptance of the User Agreement.
When any user logs in, I am checking to see if his (s2m custom reg field) User_Agreement == 1. If yes, he goes on to the Login Welcome Page. If NO, he is redirected to a "User Agreement" page where he can read and accept the User Agreement, before being allowed to see the site content.
I need this User Agreement page to show that checkbox, enabled but unchecked, so the member can click it. And then of course a submit button to save the input and update that value in the user's profile in the database.
To figure this out, I tried figuring out the hooks in s2member/profile.inc.php, perhaps to use CSS to hide (display:none) all < tr > in the Profile Modification < table > and then unhide just the row I need (with my custom field in it), but couldn't figure out how to target just that row, or its contents. Also couldn't figure out how to use hooks to hide the other rows with php instead of css.
Any ideas how to approach this -- to allow a member to see and edit one custom reg field?
Otherwise, maybe I use a non-s2m field for this.. use a wp custom user field, which might be easier to accomplish this with. But then my paying members would not click to accept the User Agreement during payment, but rather upon initial login, along with these non-paying members.
Has anyone dealt with anything like this before? Thanks for any insights.
Some of my members will have logins they did not get by using the payment form, where paying customers had to click a checkbox to indicate acceptance of the User Agreement.
When any user logs in, I am checking to see if his (s2m custom reg field) User_Agreement == 1. If yes, he goes on to the Login Welcome Page. If NO, he is redirected to a "User Agreement" page where he can read and accept the User Agreement, before being allowed to see the site content.
I need this User Agreement page to show that checkbox, enabled but unchecked, so the member can click it. And then of course a submit button to save the input and update that value in the user's profile in the database.
To figure this out, I tried figuring out the hooks in s2member/profile.inc.php, perhaps to use CSS to hide (display:none) all < tr > in the Profile Modification < table > and then unhide just the row I need (with my custom field in it), but couldn't figure out how to target just that row, or its contents. Also couldn't figure out how to use hooks to hide the other rows with php instead of css.
Any ideas how to approach this -- to allow a member to see and edit one custom reg field?
Otherwise, maybe I use a non-s2m field for this.. use a wp custom user field, which might be easier to accomplish this with. But then my paying members would not click to accept the User Agreement during payment, but rather upon initial login, along with these non-paying members.
Has anyone dealt with anything like this before? Thanks for any insights.