The MU forums have moved to WordPress.org

How to chose which checkbox that are checket on signup (6 posts)

  1. Rage00001
    Member
    Posted 13 years ago #

    On the line wp-signup.php line 263 (WPMU 2.7)

    <input id="signupblog" type="radio" name="signup_for" value="blog" <?php echo $signup['blog'] ?> />
    <label class="checkbox" for="signupblog"><?php _e('Gimme a blog!') ?></label>

    <input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup['user'] ?> />
    <label class="checkbox" for="signupuser"><?php _e('Just a username, please.') ?></label>

    I need to get the correct checkbox checked, now it always choose “'Gimme a blog!”

    Where can i choose which checkbox that are checked?

    Thanks :)

  2. Rage00001
    Member
    Posted 13 years ago #

    anyone?

  3. VentureMaker
    Member
    Posted 13 years ago #

    So you need 'Just a username, please.' checked by default, right?

    Try


    <input id="signupuser" type="radio" value="1" checked="1" name="signup_for" value="user" <?php echo $signup['user'] ?> />
    <label class="checkbox" for="signupuser"><?php _e('Just a username, please.') ?></label>

    Not sure if it's right - writing from my memory :)

  4. slambert1971
    Member
    Posted 13 years ago #

    The better option is to change line 240 of the wp-signup.php file from:

    $signup[ 'blog' ] = 'checked="checked"';

    to

    $signup[ 'user' ] = 'checked="checked"';

    This way, the system will still work with the error checking routines. Of course, you would need to do this each time this file were updated in a software update.

    Might be nice to have this as an option - request added in trac:

    http://trac.mu.wordpress.org/ticket/880

  5. Rage00001
    Member
    Posted 13 years ago #

    Thank you slambert1971 :)

    Now i removed the option “'Gimme a blog!” so that this checked option is the only option a visitor could choose...

    The result of this small change is that only registered visitors can create new blogs, and new visitors has the possibility to create a user account..

  6. slambert1971
    Member
    Posted 13 years ago #

    Glad I could help. If you only want the one option, you might consider changing the radio button to a hidden field named "signup_for" and the value of "user" where the user signup is. This way, they don't even see the option!

    The html would be

    <input type="hidden" id="signupuser" name="signup_for" value="user">

    for line 267 in the original wp-signup.php file. You probably already removed lines 264-266 to remove the "blog" option, so find the line that has the radio button for the user option.

About this Topic

  • Started 13 years ago by Rage00001
  • Latest reply from slambert1971