Blog creation at registration checked by defauld
-
During registration, I am trying to have the checkbox “Yes, I’d like to create a new site” checked by default.
In register.php you have
<input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ); ?>
and in bp-members-template.php,
function bp_get_signup_with_blog_value() { $value = ''; if ( isset( $_POST['signup_with_blog'] ) ) $value = $_POST['signup_with_blog']; }
I can’t understand how this works, and I don’t want to break something. As far as I can tell, this says, “If the checkbox is checked (after submission), then set its default state to checked (before submission)”, which does not make sense. Or am I missing something?
I could just remove the php conditional around checked=”checked”. Would that create any problems?
Or anyway what is the best way to do this?
- The topic ‘Blog creation at registration checked by defauld’ is closed to new replies.