Skip to:
Content
Pages
Categories
Search
Top
Bottom

use group field under registration form as couple, men , women


  • vaibhavyuvasoft187
    Participant

    @vaibhavyuvasoft187

    <?php get_header( ‘buddypress’ ); ?>
    <!– MAIN SECTION
    ================================================ –>
    <section>
    <div id=”main”>
    <div class=”row”>
    <div class=”twelve columns”>
    <?php do_action( ‘bp_before_register_page’ ); ?>
    <div id=”register-page”>
    <form action=”” name=”signup_form” id=”signup_form” class=”standard-form custom” method=”post” enctype=”multipart/form-data”>
    <?php if ( ‘registration-disabled’ == bp_get_current_signup_step() ) : ?>
    <?php do_action( ‘template_notices’ ); ?>
    <?php do_action( ‘bp_before_registration_disabled’ ); ?>
    <p><?php _e( ‘User registration is currently not allowed.’, ‘buddypress’ ); ?></p>
    <?php do_action( ‘bp_after_registration_disabled’ ); ?>
    <?php endif; // registration-disabled signup setp ?>
    <?php if ( ‘request-details’ == bp_get_current_signup_step() ) : ?>
    <div class=”row”>
    <div class=”twelve columns”>
    <h2 class=”article-title text-center”><?php _e( ‘Create an Account’, ‘buddypress’ ); ?></h2>
    </div>
    <!–end twelve–>
    </div>
    <?php do_action( ‘template_notices’ ); ?>
    <p class=”lead”><?php _e( ‘Registering for this site is easy. Just fill in the fields below, and we\’ll get a new account set up for you in no time.’, ‘buddypress’ ); ?></p>
    <br><br>
    <?php do_action( ‘bp_before_account_details_fields’ ); ?>
    <div class=”row”>
    <div class=”register-section six columns” id=”basic-details-section”>
    <?php /***** Basic Account Details ******/ ?>
    <h4><i class=”icon icon-user”></i> <?php _e( ‘Account Details’, ‘buddypress’ ); ?></h4>
    <br>
    <label for=”signup_username”><?php _e( ‘Username’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php do_action( ‘bp_signup_username_errors’ ); ?>
    <input type=”text” name=”signup_username” id=”signup_username” value=”<?php bp_signup_username_value(); ?>” />
    <label for=”signup_email”><?php _e( ‘Email Address’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php do_action( ‘bp_signup_email_errors’ ); ?>
    <input type=”text” name=”signup_email” id=”signup_email” value=”<?php bp_signup_email_value(); ?>” />
    <label for=”signup_password”><?php _e( ‘Choose a Password’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php do_action( ‘bp_signup_password_errors’ ); ?>
    <input type=”password” name=”signup_password” id=”signup_password” value=”<?php bp_signup_password_value(); ?>” class=”password-entry” />
    <div id=”pass-strength-result”></div>
    <label for=”signup_password_confirm”><?php _e( ‘Confirm Password’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php do_action( ‘bp_signup_password_confirm_errors’ ); ?>
    <input type=”password” name=”signup_password_confirm” id=”signup_password_confirm” value=”<?php bp_signup_password_confirm_value(); ?>” class=”password-entry-confirm” />
    <br><br>
    </div>
    <!– #basic-details-section –>
    <?php do_action( ‘bp_after_account_details_fields’ ); ?>
    <?php /***** Extra Profile Details ******/ ?>
    <?php if ( bp_is_active( ‘xprofile’ ) ) : ?>
    <?php do_action( ‘bp_before_signup_profile_fields’ ); ?>
    <div class=”register-section six columns” id=”profile-details-section”>
    <h4><i class=”icon icon-comments”></i> <?php _e( ‘Profile Details’, ‘buddypress’ ); ?></h4>
    <div class=”check-group”>
    <div class=”col-md-4 col-sm-4″>
    <label for=”g1″ class=”g1″>
    <input type=”radio” name=”colorRadio” value=”first-section” id=”g1″ checked=”checked”> Algemeen
    </label>
    </div>
    <div class=”col-md-4 col-sm-4″>
    <label for=”g2″ class=”g2″>
    <input type=”radio” name=”colorRadio” value=”second-section” id=”g2″> Man
    </label>
    </div>
    <div class=”col-md-4 col-sm-4″>
    <label for=”g3″ class=”g3″>
    <input type=”radio” name=”colorRadio” value=”third-section” id=”g3″> Vrouw
    </label>
    </div>
    </div>
    <br>

    <section class=”first-section radio-section”>
    <!– <h1>Algemeen</h1> –>
    <?php /* Use the profile field loop to render input fields for the ‘base’ profile field group */ ?>
    <?php if ( bp_is_active( ‘xprofile’ ) ) : if ( bp_has_profile( array( ‘profile_group_id’ => 1, ‘fetch_field_data’ => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    <div class=”<?php if(‘selectbox’ == bp_get_the_profile_field_type() || ‘multiselectbox’ == bp_get_the_profile_field_type() ) echo ‘six’; else echo ‘twelve’;?> columns”>
    <div<?php bp_field_css_class( ‘editfield’ ); ?>>
    <?php
    $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    $field_type->edit_field_html();

    do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ );

    if ( bp_current_user_can( ‘bp_xprofile_change_field_visibility’ ) ) : ?>
    <p class=”field-visibility-settings-notoggle” id=”field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>”>
    <?php
    printf(
    __( ‘This field can be seen by: %s’, ‘buddypress’ ),
    ‘<span class=”current-visibility-level”>’ . bp_get_the_profile_field_visibility_level_label() . ‘</span>’
    );
    ?>
    </p>
    <div class=”field-visibility-settings” id=”field-visibility-settings-<?php bp_the_profile_field_id() ?>”>
    <fieldset>
    <legend><?php _e( ‘Who can see this field?’, ‘buddypress’ ) ?></legend>
    <?php bp_profile_visibility_radio_buttons() ?>
    </fieldset>
    <?php _e( ‘Close’, ‘buddypress’ ) ?>
    </div>
    <?php else : ?>
    <p class=”field-visibility-settings-notoggle” id=”field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>”>
    <?php
    printf(
    __( ‘This field can be seen by: %s’, ‘buddypress’ ),
    ‘<span class=”current-visibility-level”>’ . bp_get_the_profile_field_visibility_level_label() . ‘</span>’
    );
    ?>
    </p>
    <?php endif ?>
    <?php do_action( ‘bp_custom_profile_edit_fields’ ); ?>
    <p class=”description”><?php bp_the_profile_field_description(); ?></p>
    </div>
    </div>
    <?php endwhile; ?>
    <?php $fields_ids[]= bp_get_the_profile_field_id();?>
    <?php endwhile; endif; endif; ?>
    </section>

    <section class=”second-section radio-section”>
    <!– <h1>Man</h1> –>
    <?php if ( bp_is_active( ‘xprofile’ ) ) : if ( bp_has_profile( array( ‘profile_group_id’ => 2, ‘fetch_field_data’ => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    <div class=”<?php if(‘selectbox’ == bp_get_the_profile_field_type() || ‘multiselectbox’ == bp_get_the_profile_field_type() ) echo ‘six’; else echo ‘twelve’;?> columns”>
    <div<?php bp_field_css_class( ‘editfield’ ); ?>>
    <?php
    $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    $field_type->edit_field_html();

    do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ );

    if ( bp_current_user_can( ‘bp_xprofile_change_field_visibility’ ) ) : ?>
    <p class=”field-visibility-settings-notoggle” id=”field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>”>
    <?php
    printf(
    __( ‘This field can be seen by: %s’, ‘buddypress’ ),
    ‘<span class=”current-visibility-level”>’ . bp_get_the_profile_field_visibility_level_label() . ‘</span>’
    );
    ?>
    </p>
    <div class=”field-visibility-settings” id=”field-visibility-settings-<?php bp_the_profile_field_id() ?>”>
    <fieldset>
    <legend><?php _e( ‘Who can see this field?’, ‘buddypress’ ) ?></legend>
    <?php bp_profile_visibility_radio_buttons() ?>
    </fieldset>
    <?php _e( ‘Close’, ‘buddypress’ ) ?>
    </div>
    <?php else : ?>
    <p class=”field-visibility-settings-notoggle” id=”field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>”>
    <?php
    printf(
    __( ‘This field can be seen by: %s’, ‘buddypress’ ),
    ‘<span class=”current-visibility-level”>’ . bp_get_the_profile_field_visibility_level_label() . ‘</span>’
    );
    ?>
    </p>
    <?php endif ?>
    <?php do_action( ‘bp_custom_profile_edit_fields’ ); ?>
    <p class=”description”><?php bp_the_profile_field_description(); ?></p>
    </div>
    </div>
    <?php endwhile; ?>
    <?php $fields_ids[]= bp_get_the_profile_field_id();?>
    <?php endwhile; endif; endif; ?>
    </section>

    <section class=”third-section radio-section”>
    <!– <h1>Vrouw</h1> –>
    <?php if ( bp_is_active( ‘xprofile’ ) ) : if ( bp_has_profile( array( ‘profile_group_id’ => 3, ‘fetch_field_data’ => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    <div class=”<?php if(‘selectbox’ == bp_get_the_profile_field_type() || ‘multiselectbox’ == bp_get_the_profile_field_type() ) echo ‘six’; else echo ‘twelve’;?> columns”>
    <div<?php bp_field_css_class( ‘editfield’ ); ?>>
    <?php
    $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    $field_type->edit_field_html();

    do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ );

    if ( bp_current_user_can( ‘bp_xprofile_change_field_visibility’ ) ) : ?>
    <p class=”field-visibility-settings-notoggle” id=”field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>”>
    <?php
    printf(
    __( ‘This field can be seen by: %s’, ‘buddypress’ ),
    ‘<span class=”current-visibility-level”>’ . bp_get_the_profile_field_visibility_level_label() . ‘</span>’
    );
    ?>
    </p>
    <div class=”field-visibility-settings” id=”field-visibility-settings-<?php bp_the_profile_field_id() ?>”>
    <fieldset>
    <legend><?php _e( ‘Who can see this field?’, ‘buddypress’ ) ?></legend>
    <?php bp_profile_visibility_radio_buttons() ?>
    </fieldset>
    <?php _e( ‘Close’, ‘buddypress’ ) ?>
    </div>
    <?php else : ?>
    <p class=”field-visibility-settings-notoggle” id=”field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>”>
    <?php
    printf(
    __( ‘This field can be seen by: %s’, ‘buddypress’ ),
    ‘<span class=”current-visibility-level”>’ . bp_get_the_profile_field_visibility_level_label() . ‘</span>’
    );
    ?>
    </p>
    <?php endif ?>
    <?php do_action( ‘bp_custom_profile_edit_fields’ ); ?>
    <p class=”description”><?php bp_the_profile_field_description(); ?></p>
    </div>
    </div>
    <?php endwhile; ?>
    <?php $fields_ids[]= bp_get_the_profile_field_id();?>
    <?php endwhile; endif; endif; ?>
    </section>

    <input type=”hidden” name=”signup_profile_field_ids” id=”signup_profile_field_ids” value=”<?php echo implode(“,”,$fields_ids);?>” />
    </div>
    <!– #profile-details-section –>
    </div>
    <?php do_action( ‘bp_after_signup_profile_fields’ ); ?>
    <?php endif; ?>
    <?php if ( bp_get_blog_signup_allowed() ) : ?>
    <?php do_action( ‘bp_before_blog_details_fields’ ); ?>
    <?php /***** Blog Creation Details ******/ ?>
    <div class=”register-section” id=”blog-details-section”>
    <h4><?php _e( ‘Blog Details’, ‘buddypress’ ); ?></h4>
    <p><label for=”signup_with_blog”><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’ ); ?></label></p>
    <div id=”blog-details”<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class=”show”<?php endif; ?>>
    <label for=”signup_blog_url”><?php _e( ‘Blog URL’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php do_action( ‘bp_signup_blog_url_errors’ ); ?>
    <?php if ( is_subdomain_install() ) : ?>
    http:// <input type=”text” name=”signup_blog_url” id=”signup_blog_url” value=”<?php bp_signup_blog_url_value(); ?>” /> .<?php bp_blogs_subdomain_base(); ?>
    <?php else : ?>
    <?php echo site_url(); ?>/ <input type=”text” name=”signup_blog_url” id=”signup_blog_url” value=”<?php bp_signup_blog_url_value(); ?>” />
    <?php endif; ?>
    <label for=”signup_blog_title”><?php _e( ‘Site Title’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php do_action( ‘bp_signup_blog_title_errors’ ); ?>
    <input type=”text” name=”signup_blog_title” id=”signup_blog_title” value=”<?php bp_signup_blog_title_value(); ?>” />
    <label><?php _e( ‘I would like my site to appear in search engines, and in public listings around this network.’, ‘buddypress’ ); ?>:</label>
    <?php do_action( ‘bp_signup_blog_privacy_errors’ ); ?>
    <label><input type=”radio” name=”signup_blog_privacy” id=”signup_blog_privacy_public” value=”public”<?php if ( ‘public’ == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked=”checked”<?php endif; ?> /> <?php _e( ‘Yes’, ‘buddypress’ ); ?></label>
    <label><input type=”radio” name=”signup_blog_privacy” id=”signup_blog_privacy_private” value=”private”<?php if ( ‘private’ == bp_get_signup_blog_privacy_value() ) : ?> checked=”checked”<?php endif; ?> /> <?php _e( ‘No’, ‘buddypress’ ); ?></label>
    </div>
    </div>
    <!– #blog-details-section –>
    <?php do_action( ‘bp_after_blog_details_fields’ ); ?>
    <?php endif; ?>
    <?php do_action( ‘bp_before_registration_submit_buttons’ ); ?>
    <div class=”submit”>
    <input type=”submit” class=”button radius pull-right” name=”signup_submit” id=”signup_submit” value=”<?php _e( ‘Complete Sign Up’, ‘buddypress’ ); ?>” />
    </div>
    <?php do_action( ‘bp_after_registration_submit_buttons’ ); ?>
    <?php wp_nonce_field( ‘bp_new_signup’ ); ?>
    <?php endif; // request-details signup step ?>
    <?php if ( ‘completed-confirmation’ == bp_get_current_signup_step() ) : ?>
    <h2 class=”article-title”><?php _e( ‘Sign Up Complete!’, ‘kleo_framework’ ); ?></h2>
    <?php do_action( ‘template_notices’ ); ?>
    <?php do_action( ‘bp_before_registration_confirmed’ ); ?>
    <?php if ( bp_registration_needs_activation() ) : ?>
    <p><?php _e( ‘You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.’, ‘buddypress’ ); ?></p>
    <?php else : ?>
    <p><?php _e( ‘You have successfully created your account! Please log in using the username and password you have just created.’, ‘buddypress’ ); ?></p>
    <?php endif; ?>
    <?php do_action( ‘bp_after_registration_confirmed’ ); ?>
    <?php endif; // completed-confirmation signup step ?>
    <?php do_action( ‘bp_custom_signup_steps’ ); ?>
    </form>
    </div>
    <?php do_action( ‘bp_after_register_page’ ); ?>
    <div class=”clearfix”></div>
    <br><br>
    </div>
    <!–end twelve–>
    </div>
    <!–end row–>
    </div>
    <!–end main–>
    </section>
    <!–END MAIN SECTION–>
    <style type=”text/css”>
    .check-group{
    width: 100%;
    margin-bottom: 70px;
    }
    .check-group .col-md-4{
    width: 20%;
    float: left;
    }
    .check-group label{
    background: none;
    padding: 8px 12px;
    border-radius: 5px;
    width: 60%;
    border:2px solid #d7b46a;
    color: #fff;
    }
    </style>
    <script type=”text/javascript”>
    jQuery(document).ready( function() {
    if ( jQuery(‘div#blog-details’).length && !jQuery(‘div#blog-details’).hasClass(‘show’) )
    jQuery(‘div#blog-details’).toggle();

    jQuery( ‘input#signup_with_blog’ ).change( function() {
    if(jQuery(this).is(‘:checked’)) {
    jQuery(‘div#blog-details’).fadeIn();
    }
    else {
    jQuery(‘div#blog-details’).fadeOut();
    }
    });
    });
    </script>
    <script type=”text/javascript”>
    // jQuery(document).ready(function(){
    // jQuery(‘input[type=”radio”]’).click(function(){
    // var inputValue = jQuery(this).attr(“value”);
    // var targetBox = jQuery(“.” + inputValue);
    // jQuery(“.radio-section”).not(targetBox).hide();
    // jQuery(targetBox).show();
    // });
    // });
    jQuery(document).ready(function(){
    jQuery(‘.second-section’).hide(‘fast’);
    jQuery(‘.third-section’).hide(‘fast’);
    jQuery(‘.first-section’).show(‘fast’);
    jQuery(‘.g1’).css({‘background’: ‘#d7b46a’, ‘color’: ‘#333’});

    jQuery(‘.g1’).click(function(){
    jQuery(‘.second-section’).hide(‘fast’);
    jQuery(‘.third-section’).hide(‘fast’);
    jQuery(‘.first-section’).show(‘fast’);
    jQuery(‘.g1’).css({‘background’: ‘#d7b46a’, ‘color’:’#333′});
    jQuery(‘.g2’).css({‘background’: ‘none’, ‘color’:’#fff’});
    jQuery(‘.g3’).css({‘background’: ‘none’, ‘color’:’#fff’});
    })
    jQuery(‘.g2’).click(function(){
    jQuery(‘.first-section’).hide(‘fast’);
    jQuery(‘.third-section’).hide(‘fast’);
    jQuery(‘.second-section’).show(‘fast’);
    jQuery(‘.g1’).css({‘background’: ‘none’, ‘color’:’#fff’});
    jQuery(‘.g2’).css({‘background’: ‘#d7b46a’, ‘color’:’#333′});
    jQuery(‘.g3’).css({‘background’: ‘none’, ‘color’:’#fff’});
    })
    jQuery(‘.g3’).click(function(){
    jQuery(‘.first-section’).hide(‘fast’);
    jQuery(‘.second-section’).hide(‘fast’);
    jQuery(‘.third-section’).show(‘fast’);
    jQuery(‘.g1’).css({‘background’: ‘none’, ‘color’:’#fff’});
    jQuery(‘.g3’).css({‘background’: ‘#d7b46a’, ‘color’:’#333′});
    jQuery(‘.g2’).css({‘background’: ‘none’, ‘color’:’#fff’});
    })
    })
    </script>
    <?php get_footer( ‘buddypress’ ); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar