2 different registration forms with different custom fields
Posted: January 19th, 2012, 4:00 pm
The tittle of this topic pretty much states on what i'm trying to accomplish - coudnt find a ready sollution so i;m trying to make it myself.
I saw this http://www.s2member.com/custom-fields-d ... lly-video/ video but it is about editing already existing custom fields, and i want to hide/show fields depending on where registration form is displayed.
I have 2 registration forms - one on hidden site, so only people with the link will be able to register (made by pro form []) this registration sets some custom capabilities on level 0 . The second registration is on standard wp-login.php?action=register. Registration is open and both reg-forms are free. But i want pro-form registration to display difrent fields than on standard www.mysite.com/wp-login.php?action=register wordpress form.
In wp-login.php file there is a code :
that code generates standard username and email field and then there is
<?php do_action('register_form'); ?>
that i belive creates rest of fields. question where is a file with do_action('register_form') function ? so i coud see how it works?.
I've even tried what seems a tottaly non-profesional way by editing wp-login.php and writing some javascript code to set .style.display='none'; of custom field holder ID. like :
document.getElementById('ws-plugin--s2member-custom-customfieldID').style.display='none';
but problem is that labels for those fields are in <span> and i cant make them disappear by javascript cause they have no ID.
Any ideas on how to make pro form registration display additional 3 custom fields that wont be displayed on standard registration site in www.mysite.com/wp-login.php?action=register ?
I saw this http://www.s2member.com/custom-fields-d ... lly-video/ video but it is about editing already existing custom fields, and i want to hide/show fields depending on where registration form is displayed.
I have 2 registration forms - one on hidden site, so only people with the link will be able to register (made by pro form []) this registration sets some custom capabilities on level 0 . The second registration is on standard wp-login.php?action=register. Registration is open and both reg-forms are free. But i want pro-form registration to display difrent fields than on standard www.mysite.com/wp-login.php?action=register wordpress form.
In wp-login.php file there is a code :
- Code: Select all
<form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post">
<p>
<label for="user_login"><?php _e('Username') ?><br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>
</p>
<p>
<label for="user_email"><?php _e('E-mail') ?><br />
<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" tabindex="20" /></label>
</p>
that code generates standard username and email field and then there is
<?php do_action('register_form'); ?>
that i belive creates rest of fields. question where is a file with do_action('register_form') function ? so i coud see how it works?.
I've even tried what seems a tottaly non-profesional way by editing wp-login.php and writing some javascript code to set .style.display='none'; of custom field holder ID. like :
document.getElementById('ws-plugin--s2member-custom-customfieldID').style.display='none';
but problem is that labels for those fields are in <span> and i cant make them disappear by javascript cause they have no ID.
Any ideas on how to make pro form registration display additional 3 custom fields that wont be displayed on standard registration site in www.mysite.com/wp-login.php?action=register ?