student registration page customizing

hw do i customize student registration page by adding customizing field like student_location and student_mobile .... ????

  • Vaughan

    Hi @Shahria Mahmud Khan,

    Hope you're well?

    You would need to edit & customize the plugin code for this which is not recommended as the changes will be lost when you update the plugin.

    You would start by editing the signup template

    /coursepress/includes/templates/popup-window-signup.php

    Adding the extra fields in there, though you'd need to also edit other parts of the plugin too.

    /js/front-enrollment-process.js

    In this you'd need to add the validation checks.

    coursepress.php

    And then the admin pagess too :S

    Not sure how simple this would be though to get working. I could ask one of our developers to see if he could offer a quicker solution, but ultimately, if this would be too much you might need to hire a developer to make these changes for you. We do have a jobs board here which you could advertise with. https://premium.wpmudev.org/wordpress-development/

    Hope this helps

  • Hoang Ngo

    Hi all

    I hope you are well today.

    We can add custom field to the CoursePress by this way, please add this code to your theme functions.php or use mu-plugins

    add_action( 'coursepress_after_all_signup_fields', 'custom_field_cp_signup' );
    function custom_field_cp_signup() {
    	?>
    	<label>
    		<?php _e( 'Phone', 'cp' ); ?>:
    		<input type="text" name="student_phone" value="" />
    	</label>
    	<label>
    		<?php _e( 'Location', 'cp' ); ?>:
    		<input type="text" name="student_location" value="" />
    	</label>
    <?php
    }
    
    add_action('user_register','student_signup');
    function student_signup($user_id){
    	//do your logic to check and save student meta here
    }

    If you have any issues please don't hesitate to let us know so we can assist

    Best regards,
    Hoang Ngo

  • Hoang Ngo

    @Danny Albeck,

    Profile photo of wordpress usually using Gavatar, but if you want to do a manual thing, so I think here is how we can do
    1. Add a file field called avatar_upload, and a hidden field call avatar_url
    2. As the file field, we use it for user to upload a file, and we using the jquery plugin called iframe transport for ajax submit, after the avatar submit done, you get the result (avatar url or attachment id ), binding it to the hidden field, and then when people submit the register form, you can link it to the user by user meta

    For the profile edit, you can using this action hook coursepress_after_settings_pasword for append the form input, and the hook profile_update for process the data.

    If you have any issues please don't hesitate to let us know so we can assist

    Best regards,
    Hoang Ngo

  • Danny Albeck

    @Hoang Ngo,

    Sorry I am not entirely following, so below is my code. What tweak / addition is needed to store the new Location field?

    // Registration Form Customization
    
    add_action( 'coursepress_after_all_signup_fields', 'custom_field_cp_signup' );
    function custom_field_cp_signup() {
    	?>
    	<label>
    		<?php _e( 'Phone', 'cp' ); ?>:
    		<input type="text" name="student_phone" value="" />
    	</label>
    	<label>
    		<?php _e( 'Location', 'cp' ); ?>:
    		<input type="text" name="student_location" value="" />
    	</label>
    <?php
    }
    
    add_action('user_register','student_signup');
    function student_signup($user_id){
    	//do your logic to check and save student meta here
    }

    Thanks!

  • Hoang Ngo

    Hi @@Danny Albeck,

    I hope you are well today.
    You can save it to the user meta by this way

    add_action('coursepress_after_all_signup_fields', 'custom_field_cp_signup');
    function custom_field_cp_signup()
    {
        $location = isset($_POST['student_location']) ? $_POST['student_location'] : null;
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : null;
        ?>
        <label>
            <?php _e('Phone', 'cp'); ?>:
            <input type="text" name="student_phone" value="<?php echo $location ?>"/>
        </label>
        <label>
            <?php _e('Location', 'cp'); ?>:
            <input type="text" name="student_location" value="<?php echo $phone ?>"/>
        </label>
    <?php
    }
    
    add_action('user_register', 'student_signup');
    function student_signup($user_id)
    {
        $location = isset($_POST['student_location']) ? $_POST['student_location'] : null;
    
        update_user_meta($user_id, 'student_location', $location);
    }

    This is a basic example, so you can extend it for saving other fields.
    If you have any issues please don't hesitate to let us know so we can assist

    Best regards,
    Hoang Ngo

  • Danny Albeck

    @Hoang Ngo,

    I just updated my functions.php file with the above code but no luck. The 2 sample fields do show up on the registration page, but not the profile page after the signup is complete.

    // Registration Form Customization
    
    add_action('coursepress_after_all_signup_fields', 'custom_field_cp_signup');
    function custom_field_cp_signup() {
        $location = isset($_POST['student_location']) ? $_POST['student_location'] : null;
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : null;
        ?>
        <label>
            <?php _e('Phone', 'cp'); ?>:
            <input type="text" name="student_phone" value="<?php echo $location ?>"/>
        </label>
        <label>
            <?php _e('Location', 'cp'); ?>:
            <input type="text" name="student_location" value="<?php echo $phone ?>"/>
        </label>
    <?php
    }
    
    add_action('user_register', 'student_signup');
    function student_signup($user_id) {
        $location = isset($_POST['student_location']) ? $_POST['student_location'] : null;
        update_user_meta($user_id, 'student_location', $location);
    }

    That is what it looks like

  • Hoang Ngo

    Hi @Danny Albeck,

    I hope you are well today.

    So here is the code for profile page

    add_action('coursepress_after_settings_pasword', 'custom_field_cp_profile');
    function custom_field_cp_profile()
    {
        $location = isset($_POST['student_location']) ? $_POST['student_location'] : get_user_meta(get_current_user_id(), 'student_location', true);
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : get_user_meta(get_current_user_id(), 'student_phone', true);
        ?>
        <label>
            <?php _e('Phone', 'cp'); ?>:
            <input type="text" name="student_phone" value="<?php echo $location ?>"/>
        </label>
        <label>
            <?php _e('Location', 'cp'); ?>:
            <input type="text" name="student_location" value="<?php echo $phone ?>"/>
        </label>
    <?php
    }
    
    add_action('profile_update', 'student_profile_update');
    function student_profile_update($user_id)
    {
        $location = isset($_POST['student_location']) ? $_POST['student_location'] : null;
        if (!empty($location))
            update_user_meta($user_id, 'student_location', $location);
    
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : null;
        if (!empty($phone))
            update_user_meta($user_id, 'student_phone', $phone);
    }

    Best regards,
    Hoang Ngo

  • Danny Albeck

    Sorry for the double post but any suggestion on implementing a drop down for states?

    I have tried 2 methods:

    Method 1:

    <label>
    	<?php _e('State', 'cp'); ?>:
    	<select name="state">
    		<option name="AL" value="<?php echo $al ?>">Alabama</option>
    		<option name="AK" value="<?php echo $ak ?>">Alaska</option>
    		<option value="AZ">Arizona</option>
    		<option value="AR">Arkansas</option>
    		<option value="CA">California</option>
    		<option value="CO">Colorado</option>
    		<option value="CT">Connecticut</option>
    		<option value="DE">Delaware</option>
    		<option value="DC">District Of Columbia</option>
    		<option value="FL">Florida</option>
    		<option value="GA">Georgia</option>
    		<option value="HI">Hawaii</option>
    		<option value="ID">Idaho</option>
    		<option value="IL">Illinois</option>
    		<option value="IN">Indiana</option>
    		<option value="IA">Iowa</option>
    		<option value="KS">Kansas</option>
    		<option value="KY">Kentucky</option>
    		<option value="LA">Louisiana</option>
    		<option value="ME">Maine</option>
    		<option value="MD">Maryland</option>
    		<option value="MA">Massachusetts</option>
    		<option value="MI">Michigan</option>
    		<option value="MN">Minnesota</option>
    		<option value="MS">Mississippi</option>
    		<option value="MO">Missouri</option>
    		<option value="MT">Montana</option>
    		<option value="NE">Nebraska</option>
    		<option value="NV">Nevada</option>
    		<option value="NH">New Hampshire</option>
    		<option name="NJ" value="<?php echo $nj ?>">New Jersey</option>
    		<option value="NM">New Mexico</option>
    		<option value="NY">New York</option>
    		<option value="NC">North Carolina</option>
    		<option value="ND">North Dakota</option>
    		<option value="OH">Ohio</option>
    		<option value="OK">Oklahoma</option>
    		<option value="OR">Oregon</option>
    		<option value="PA">Pennsylvania</option>
    		<option value="RI">Rhode Island</option>
    		<option value="SC">South Carolina</option>
    		<option value="SD">South Dakota</option>
    		<option value="TN">Tennessee</option>
    		<option value="TX">Texas</option>
    		<option value="UT">Utah</option>
    		<option value="VT">Vermont</option>
    		<option value="VA">Virginia</option>
    		<option value="WA">Washington</option>
    		<option value="WV">West Virginia</option>
    		<option value="WI">Wisconsin</option>
    		<option value="WY">Wyoming</option>
    	</select>
    </label>
    
        $state = isset($_POST['state']) ? $_POST['state'] : null;
        if (!empty($state))
    
        $al = isset($_POST['al']) ? $_POST['al'] : null;
        if (!empty($al))
        	update_user_meta($user_id, 'al', $al);
    
        $ak = isset($_POST['ak']) ? $_POST['ak'] : null;
        if (!empty($ak))
        	update_user_meta($user_id, 'ak', $ak);
    
        $al = isset($_POST['al']) ? $_POST['al'] : null;
        if (!empty($al))
        	update_user_meta($user_id, 'al', $al);
    
        $nj = isset($_POST['nj']) ? $_POST['nj'] : null;
        if (!empty($nj))
        	update_user_meta($user_id, 'nj', $nj);

    Method 2:

    <label>
    	<?php _e('State', 'cp'); ?>:
    	<select name="state">
    		<option name="AL" value="<?php echo $state ?>">Alabama</option>
    		<option name="AK" value="<?php echo $state ?>">Alaska</option>
    		<option value="AZ">Arizona</option>
    		<option value="AR">Arkansas</option>
    		<option value="CA">California</option>
    		<option value="CO">Colorado</option>
    		<option value="CT">Connecticut</option>
    		<option value="DE">Delaware</option>
    		<option value="DC">District Of Columbia</option>
    		<option value="FL">Florida</option>
    		<option value="GA">Georgia</option>
    		<option value="HI">Hawaii</option>
    		<option value="ID">Idaho</option>
    		<option value="IL">Illinois</option>
    		<option value="IN">Indiana</option>
    		<option value="IA">Iowa</option>
    		<option value="KS">Kansas</option>
    		<option value="KY">Kentucky</option>
    		<option value="LA">Louisiana</option>
    		<option value="ME">Maine</option>
    		<option value="MD">Maryland</option>
    		<option value="MA">Massachusetts</option>
    		<option value="MI">Michigan</option>
    		<option value="MN">Minnesota</option>
    		<option value="MS">Mississippi</option>
    		<option value="MO">Missouri</option>
    		<option value="MT">Montana</option>
    		<option value="NE">Nebraska</option>
    		<option value="NV">Nevada</option>
    		<option value="NH">New Hampshire</option>
    		<option value="<?php echo $state ?>">New Jersey</option>
    		<option value="NM">New Mexico</option>
    		<option value="NY">New York</option>
    		<option value="NC">North Carolina</option>
    		<option value="ND">North Dakota</option>
    		<option value="OH">Ohio</option>
    		<option value="OK">Oklahoma</option>
    		<option value="OR">Oregon</option>
    		<option value="PA">Pennsylvania</option>
    		<option value="RI">Rhode Island</option>
    		<option value="SC">South Carolina</option>
    		<option value="SD">South Dakota</option>
    		<option value="TN">Tennessee</option>
    		<option value="TX">Texas</option>
    		<option value="UT">Utah</option>
    		<option value="VT">Vermont</option>
    		<option value="VA">Virginia</option>
    		<option value="WA">Washington</option>
    		<option value="WV">West Virginia</option>
    		<option value="WI">Wisconsin</option>
    		<option value="WY">Wyoming</option>
    	</select>
    </label>
    
        $state = isset($_POST['state']) ? $_POST['state'] : null;
        if (!empty($state))
            update_user_meta($user_id, 'state', $state);
            update_user_meta($user_id, 'al', $al);
            update_user_meta($user_id, 'ak', $ak);
            update_user_meta($user_id, 'nj', $nj);

    Thanks so much for the help!

  • Hoang Ngo

    Hi @Danny Albeck,

    I hope you are well today.

    The validation, you will need to custom coding it, also, it seem we need to modify the plugin code.

    At file /coursepress/includes/templates/student-settings.php line 38, you will see the code look like this

    if ( $form_errors == 0 ) {
                    $student = new Student(get_current_user_id());
                    if ( $student->update_student_data($student_data) ) {
                        $form_message = __('Profile has been updated successfully.', 'cp');
                        $form_message_class = 'regular';
                    } else {
                        $form_message = __('An error occured while updating. Please check the form and try again.', 'cp');
                        $form_message_class = 'red';
                    }
                }

    You can add your validation code before it.

    About the select, if you not make it multiselect, so there's only 1 value return, the $_POST['state'], the other will be null. In this case I think we only need the process of $_POST['state']

    Best regards,
    Hoang Ngo

  • Danny Albeck

    @Hoang Ngo,

    I am sorry, still having issues with the select box (not a multi-select):

    $state = isset($_POST['state']) ? $_POST['state'] : get_user_meta(get_current_user_id(), 'state', true);

    <label>
    	<?php _e('State', 'cp'); ?>:
    	<select name="state" value="<?php echo $state ?>">
    		<option value="AL">Alabama</option>
    		<option value="AK">Alaska</option>
    		<option value="AZ">Arizona</option>
    		<option value="AR">Arkansas</option>
    		<option value="CA">California</option>
    		<option value="CO">Colorado</option>
    		<option value="CT">Connecticut</option>
    		<option value="DE">Delaware</option>
    		<option value="DC">District Of Columbia</option>
    		<option value="FL">Florida</option>
    		<option value="GA">Georgia</option>
    		<option value="HI">Hawaii</option>
    		<option value="ID">Idaho</option>
    		<option value="IL">Illinois</option>
    		<option value="IN">Indiana</option>
    		<option value="IA">Iowa</option>
    		<option value="KS">Kansas</option>
    		<option value="KY">Kentucky</option>
    		<option value="LA">Louisiana</option>
    		<option value="ME">Maine</option>
    		<option value="MD">Maryland</option>
    		<option value="MA">Massachusetts</option>
    		<option value="MI">Michigan</option>
    		<option value="MN">Minnesota</option>
    		<option value="MS">Mississippi</option>
    		<option value="MO">Missouri</option>
    		<option value="MT">Montana</option>
    		<option value="NE">Nebraska</option>
    		<option value="NV">Nevada</option>
    		<option value="NH">New Hampshire</option>
    		<option value="NJ">New Jersey</option>
    		<option value="NM">New Mexico</option>
    		<option value="NY">New York</option>
    		<option value="NC">North Carolina</option>
    		<option value="ND">North Dakota</option>
    		<option value="OH">Ohio</option>
    		<option value="OK">Oklahoma</option>
    		<option value="OR">Oregon</option>
    		<option value="PA">Pennsylvania</option>
    		<option value="RI">Rhode Island</option>
    		<option value="SC">South Carolina</option>
    		<option value="SD">South Dakota</option>
    		<option value="TN">Tennessee</option>
    		<option value="TX">Texas</option>
    		<option value="UT">Utah</option>
    		<option value="VT">Vermont</option>
    		<option value="VA">Virginia</option>
    		<option value="WA">Washington</option>
    		<option value="WV">West Virginia</option>
    		<option value="WI">Wisconsin</option>
    		<option value="WY">Wyoming</option>
    	</select>
    </label>

    Finally:

    $state = isset($_POST['state']) ? $_POST['state'] : null;
        if (!empty($state))
            update_user_meta($user_id, 'state', $state);

    Just not saving my choice. If I choose Hawaii for example it just defaults back to the first option in the drop down.

    Thanks again for your help!

    EDIT: Also, wanted to ask about the file upload again. I have been doing some research and found this: http://wordpress.stackexchange.com/questions/4307/how-can-i-add-an-image-upload-field-directly-to-a-custom-write-panel/4413#4413 ... is this what we should be looking in to for the file upload on the profile?

    Thank you!

  • Hoang Ngo

    Hi @Danny Albeck,

    The <select name="state" value="<?php echo $state ?>">
    Should be<select name="state">
    As for dropdown, the value will getting from its options.

    Also, for making it binding the option you chose, for now I think you need to have a small changes to all your options
    <option value="AL" <?php echo $state=="AL"?"selected":null ?>>Alabama</option>
    The code
    <?php echo $state=="AL"?"selected":null ?>
    Will check does the state you selected is "AL" or not, if yes, it will output a code to select the option. You can apply the similar code to other options, to do the same.

    EDIT: Also, wanted to ask about the file upload again. I have been doing some research and found this: http://wordpress.stackexchange.com/questions/4307/how-can-i-add-an-image-upload-field-directly-to-a-custom-write-panel/4413#4413 ... is this what we should be looking in to for the file upload on the profile?

    That article look very good, you can give it a try . If you stuck anywhere with the coding part, please feel free for ask here, so we can assist.

    Best regards,
    Hoang Ngo

  • Danny Albeck

    Sorry about the double post but @Hoang Ngo, for my other fields I created with the above code (address, phone) I can't seem to find this on the actual registration form, just the manage profile form. And I was wondering where else would this info be stored? In the WP dashboard its not saving to the profiles in the users section or in the students section under CouresPress Pro... any feedback would be great, thank you so much!

  • Hoang Ngo

    Hi @Danny Albeck,

    I hope you are well today.

    The data will be stored in database, so if you need to get it, you will need to use this function
    get_user_meta($user_id,'student_phone')
    This is an example for getting student phone, please replace the $user_id with your user id.

    Also, can you please post the code from now, so I can take a look

    And if you need to hire someone to help you, you can always get a good developer here
    https://premium.wpmudev.org/wordpress-development/

    Best regards,
    Hoang Ngo

  • Danny Albeck

    @Hoang Ngo,

    Thank you for the response, hope you had a happy new year.

    Here is the code within my functions file as it stands currently:

    // Registration Form Customization
    
    add_action('coursepress_after_settings_pasword', 'custom_field_cp_profile');
    function custom_field_cp_profile()
    {
        $student_address = isset($_POST['student_address']) ? $_POST['student_address'] : get_user_meta(get_current_user_id(), 'student_address', true);
        $student_address2 = isset($_POST['student_address2']) ? $_POST['student_address2'] : get_user_meta(get_current_user_id(), 'student_address2', true);
        $city = isset($_POST['city']) ? $_POST['city'] : get_user_meta(get_current_user_id(), 'city', true);
        $state = isset($_POST['state']) ? $_POST['state'] : get_user_meta(get_current_user_id(), 'state', true);
        $postal = isset($_POST['postal']) ? $_POST['postal'] : get_user_meta(get_current_user_id(), 'postal', true);
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : get_user_meta(get_current_user_id(), 'student_phone', true);
        $dob = isset($_POST['student_dob']) ? $_POST['student_dob'] : get_user_meta(get_current_user_id(), 'student_dob', true);
        //$photo = do_shortcode( '[fu-upload-form]' );
        ?>
        <label>
            <?php _e('Phone', 'cp'); ?>:
            <input type="text" name="student_phone" value="<?php echo $phone ?>"/>
        </label>
        <label>
            <?php _e('Birthday (MM/DD/YYYY)', 'cp'); ?>:
            <input id="student_dob" name="student_dob" type="text" class="text" value="<?php echo $dob ?>"/>
        </label>
        <div class="clear"></div>
        <label>
            <?php _e('Street Address', 'cp'); ?>:
            <input type="text" name="student_address" value="<?php echo $student_address ?>"/>
        </label>
        <label>
            <?php _e('Street Address 2', 'cp'); ?>:
            <input type="text" name="student_address2" value="<?php echo $student_address2 ?>"/>
        </label>
        <label>
            <?php _e('City', 'cp'); ?>:
            <input type="text" name="city" value="<?php echo $city ?>"/>
        </label>
    
    	<label>
    		<?php _e('State', 'cp'); ?>:
    		<select name="state">
    			<option value="AL" <?php echo $state=="AL"?"selected":null ?>>Alabama</option>
    			<option value="AK" <?php echo $state=="AK"?"selected":null ?>>Alaska</option>
    			<option value="AZ" <?php echo $state=="AZ"?"selected":null ?>>Arizona</option>
    			<option value="AR" <?php echo $state=="AR"?"selected":null ?>>Arkansas</option>
    			<option value="CA" <?php echo $state=="CA"?"selected":null ?>>California</option>
    			<option value="CO" <?php echo $state=="CO"?"selected":null ?>>Colorado</option>
    			<option value="CT" <?php echo $state=="CT"?"selected":null ?>>Connecticut</option>
    			<option value="DE" <?php echo $state=="DE"?"selected":null ?>>Delaware</option>
    			<option value="DC" <?php echo $state=="DC"?"selected":null ?>>District Of Columbia</option>
    			<option value="FL" <?php echo $state=="FL"?"selected":null ?>>Florida</option>
    			<option value="GA" <?php echo $state=="GA"?"selected":null ?>>Georgia</option>
    			<option value="HI" <?php echo $state=="HI"?"selected":null ?>>Hawaii</option>
    			<option value="ID" <?php echo $state=="ID"?"selected":null ?>>Idaho</option>
    			<option value="IL" <?php echo $state=="IL"?"selected":null ?>>Illinois</option>
    			<option value="IN" <?php echo $state=="IN"?"selected":null ?>>Indiana</option>
    			<option value="IA" <?php echo $state=="IA"?"selected":null ?>>Iowa</option>
    			<option value="KS" <?php echo $state=="KS"?"selected":null ?>>Kansas</option>
    			<option value="KY" <?php echo $state=="KY"?"selected":null ?>>Kentucky</option>
    			<option value="LA" <?php echo $state=="LA"?"selected":null ?>>Louisiana</option>
    			<option value="ME" <?php echo $state=="ME"?"selected":null ?>>Maine</option>
    			<option value="MD" <?php echo $state=="MD"?"selected":null ?>>Maryland</option>
    			<option value="MA" <?php echo $state=="MA"?"selected":null ?>>Massachusetts</option>
    			<option value="MI" <?php echo $state=="MI"?"selected":null ?>>Michigan</option>
    			<option value="MN" <?php echo $state=="MN"?"selected":null ?>>Minnesota</option>
    			<option value="MS" <?php echo $state=="MS"?"selected":null ?>>Mississippi</option>
    			<option value="MO" <?php echo $state=="MO"?"selected":null ?>>Missouri</option>
    			<option value="MT" <?php echo $state=="MT"?"selected":null ?>>Montana</option>
    			<option value="NE" <?php echo $state=="NE"?"selected":null ?>>Nebraska</option>
    			<option value="NV" <?php echo $state=="NV"?"selected":null ?>>Nevada</option>
    			<option value="NH" <?php echo $state=="NH"?"selected":null ?>>New Hampshire</option>
    			<option value="NJ" <?php echo $state=="NJ"?"selected":null ?>>New Jersey</option>
    			<option value="NM" <?php echo $state=="NM"?"selected":null ?>>New Mexico</option>
    			<option value="NY" <?php echo $state=="NY"?"selected":null ?>>New York</option>
    			<option value="NC" <?php echo $state=="NC"?"selected":null ?>>North Carolina</option>
    			<option value="ND" <?php echo $state=="ND"?"selected":null ?>>North Dakota</option>
    			<option value="OH" <?php echo $state=="OH"?"selected":null ?>>Ohio</option>
    			<option value="OK" <?php echo $state=="OK"?"selected":null ?>>Oklahoma</option>
    			<option value="OR" <?php echo $state=="OR"?"selected":null ?>>Oregon</option>
    			<option value="PA" <?php echo $state=="PA"?"selected":null ?>>Pennsylvania</option>
    			<option value="RI" <?php echo $state=="RI"?"selected":null ?>>Rhode Island</option>
    			<option value="SC" <?php echo $state=="SC"?"selected":null ?>>South Carolina</option>
    			<option value="SD" <?php echo $state=="SD"?"selected":null ?>>South Dakota</option>
    			<option value="TN" <?php echo $state=="TN"?"selected":null ?>>Tennessee</option>
    			<option value="TX" <?php echo $state=="TX"?"selected":null ?>>Texas</option>
    			<option value="UT" <?php echo $state=="UT"?"selected":null ?>>Utah</option>
    			<option value="VT" <?php echo $state=="VT"?"selected":null ?>>Vermont</option>
    			<option value="VA" <?php echo $state=="VA"?"selected":null ?>>Virginia</option>
    			<option value="WA" <?php echo $state=="WA"?"selected":null ?>>Washington</option>
    			<option value="WV" <?php echo $state=="WV"?"selected":null ?>>West Virginia</option>
    			<option value="WI" <?php echo $state=="WI"?"selected":null ?>>Wisconsin</option>
    			<option value="WY" <?php echo $state=="WY"?"selected":null ?>>Wyoming</option>
    		</select>
    	</label>
    
        <label>
            <?php _e('Postal', 'cp'); ?>:
            <input type="text" name="postal" value="<?php echo $postal ?>"/>
        </label>
    
        <div class="clear"></div>
    
    <?php
    }
    
    add_action('profile_update', 'student_profile_update');
    function student_profile_update($user_id)
    {
    	$student_address = isset($_POST['student_address']) ? $_POST['student_address'] : null;
        if (!empty($student_address))
            update_user_meta($user_id, 'student_address', $student_address);
    
        $student_address2 = isset($_POST['student_address2']) ? $_POST['student_address2'] : null;
        if (!empty($student_address2))
            update_user_meta($user_id, 'student_address2', $student_address2);
    
        $city = isset($_POST['city']) ? $_POST['city'] : null;
        if (!empty($city))
            update_user_meta($user_id, 'city', $city);
    
        $state = isset($_POST['state']) ? $_POST['state'] : null;
        if (!empty($state))
            update_user_meta($user_id, 'state', $state);
    
    	$phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : null;
        if (!empty($phone))
            update_user_meta($user_id, 'student_phone', $phone);
    
    	$dob = isset($_POST['student_dob']) ? $_POST['student_dob'] : null;
        if (!empty($dob))
            update_user_meta($user_id, 'student_dob', $dob);
    
    	$postal = isset($_POST['postal']) ? $_POST['postal'] : null;
        if (!empty($postal))
            update_user_meta($user_id, 'postal', $postal);
    
    }

    The form works great on my profile settings page, but none of the custom fields show up on the actual registration form page.

    Thanks!

  • Danny Albeck

    @Hoang Ngo,

    Thank you so much, sorry I missed that reply. So I have the fields showing now which is awesome! Only thing I am wondering now is can the Terms of Service box be moved to the bottom of the custom fields? I have this enabled in the CoursePress settings and its placing right after the password field and then I have my custom fields after it.

    Thank you for all the help!

  • Danny Albeck

    @Hoang Ngo,

    This is the code:

    // Registration Form Customization
    
    add_action('coursepress_after_settings_pasword', 'custom_field_cp_profile');
    function custom_field_cp_profile()
    {
        $student_address = isset($_POST['student_address']) ? $_POST['student_address'] : get_user_meta(get_current_user_id(), 'student_address', true);
        $student_address2 = isset($_POST['student_address2']) ? $_POST['student_address2'] : get_user_meta(get_current_user_id(), 'student_address2', true);
        $city = isset($_POST['city']) ? $_POST['city'] : get_user_meta(get_current_user_id(), 'city', true);
        $state = isset($_POST['state']) ? $_POST['state'] : get_user_meta(get_current_user_id(), 'state', true);
        $postal = isset($_POST['postal']) ? $_POST['postal'] : get_user_meta(get_current_user_id(), 'postal', true);
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : get_user_meta(get_current_user_id(), 'student_phone', true);
        $dob = isset($_POST['student_dob']) ? $_POST['student_dob'] : get_user_meta(get_current_user_id(), 'student_dob', true);
        //$photo = do_shortcode( '[fu-upload-form]' );
        ?>
        <label>
            <?php _e('Phone', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;student_phone&quot; value=&quot;<?php echo $phone ?>&quot;/>
        </label>
        <label>
            <?php _e('Birthday (MM/DD/YYYY)', 'cp'); ?>:
            <input id=&quot;student_dob&quot; name=&quot;student_dob&quot; type=&quot;text&quot; class=&quot;text&quot; value=&quot;<?php echo $dob ?>&quot;/>
        </label>
        <div class=&quot;clear&quot;></div>
        <label>
            <?php _e('Street Address', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;student_address&quot; value=&quot;<?php echo $student_address ?>&quot;/>
        </label>
        <label>
            <?php _e('Street Address 2', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;student_address2&quot; value=&quot;<?php echo $student_address2 ?>&quot;/>
        </label>
        <label>
            <?php _e('City', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;city&quot; value=&quot;<?php echo $city ?>&quot;/>
        </label>
    
    	<label>
    		<?php _e('State', 'cp'); ?>:
    		<select name=&quot;state&quot;>
    			<option value=&quot;AL&quot; <?php echo $state==&quot;AL&quot;?&quot;selected&quot;:null ?>>Alabama</option>
    			<option value=&quot;AK&quot; <?php echo $state==&quot;AK&quot;?&quot;selected&quot;:null ?>>Alaska</option>
    			<option value=&quot;AZ&quot; <?php echo $state==&quot;AZ&quot;?&quot;selected&quot;:null ?>>Arizona</option>
    			<option value=&quot;AR&quot; <?php echo $state==&quot;AR&quot;?&quot;selected&quot;:null ?>>Arkansas</option>
    			<option value=&quot;CA&quot; <?php echo $state==&quot;CA&quot;?&quot;selected&quot;:null ?>>California</option>
    			<option value=&quot;CO&quot; <?php echo $state==&quot;CO&quot;?&quot;selected&quot;:null ?>>Colorado</option>
    			<option value=&quot;CT&quot; <?php echo $state==&quot;CT&quot;?&quot;selected&quot;:null ?>>Connecticut</option>
    			<option value=&quot;DE&quot; <?php echo $state==&quot;DE&quot;?&quot;selected&quot;:null ?>>Delaware</option>
    			<option value=&quot;DC&quot; <?php echo $state==&quot;DC&quot;?&quot;selected&quot;:null ?>>District Of Columbia</option>
    			<option value=&quot;FL&quot; <?php echo $state==&quot;FL&quot;?&quot;selected&quot;:null ?>>Florida</option>
    			<option value=&quot;GA&quot; <?php echo $state==&quot;GA&quot;?&quot;selected&quot;:null ?>>Georgia</option>
    			<option value=&quot;HI&quot; <?php echo $state==&quot;HI&quot;?&quot;selected&quot;:null ?>>Hawaii</option>
    			<option value=&quot;ID&quot; <?php echo $state==&quot;ID&quot;?&quot;selected&quot;:null ?>>Idaho</option>
    			<option value=&quot;IL&quot; <?php echo $state==&quot;IL&quot;?&quot;selected&quot;:null ?>>Illinois</option>
    			<option value=&quot;IN&quot; <?php echo $state==&quot;IN&quot;?&quot;selected&quot;:null ?>>Indiana</option>
    			<option value=&quot;IA&quot; <?php echo $state==&quot;IA&quot;?&quot;selected&quot;:null ?>>Iowa</option>
    			<option value=&quot;KS&quot; <?php echo $state==&quot;KS&quot;?&quot;selected&quot;:null ?>>Kansas</option>
    			<option value=&quot;KY&quot; <?php echo $state==&quot;KY&quot;?&quot;selected&quot;:null ?>>Kentucky</option>
    			<option value=&quot;LA&quot; <?php echo $state==&quot;LA&quot;?&quot;selected&quot;:null ?>>Louisiana</option>
    			<option value=&quot;ME&quot; <?php echo $state==&quot;ME&quot;?&quot;selected&quot;:null ?>>Maine</option>
    			<option value=&quot;MD&quot; <?php echo $state==&quot;MD&quot;?&quot;selected&quot;:null ?>>Maryland</option>
    			<option value=&quot;MA&quot; <?php echo $state==&quot;MA&quot;?&quot;selected&quot;:null ?>>Massachusetts</option>
    			<option value=&quot;MI&quot; <?php echo $state==&quot;MI&quot;?&quot;selected&quot;:null ?>>Michigan</option>
    			<option value=&quot;MN&quot; <?php echo $state==&quot;MN&quot;?&quot;selected&quot;:null ?>>Minnesota</option>
    			<option value=&quot;MS&quot; <?php echo $state==&quot;MS&quot;?&quot;selected&quot;:null ?>>Mississippi</option>
    			<option value=&quot;MO&quot; <?php echo $state==&quot;MO&quot;?&quot;selected&quot;:null ?>>Missouri</option>
    			<option value=&quot;MT&quot; <?php echo $state==&quot;MT&quot;?&quot;selected&quot;:null ?>>Montana</option>
    			<option value=&quot;NE&quot; <?php echo $state==&quot;NE&quot;?&quot;selected&quot;:null ?>>Nebraska</option>
    			<option value=&quot;NV&quot; <?php echo $state==&quot;NV&quot;?&quot;selected&quot;:null ?>>Nevada</option>
    			<option value=&quot;NH&quot; <?php echo $state==&quot;NH&quot;?&quot;selected&quot;:null ?>>New Hampshire</option>
    			<option value=&quot;NJ&quot; <?php echo $state==&quot;NJ&quot;?&quot;selected&quot;:null ?>>New Jersey</option>
    			<option value=&quot;NM&quot; <?php echo $state==&quot;NM&quot;?&quot;selected&quot;:null ?>>New Mexico</option>
    			<option value=&quot;NY&quot; <?php echo $state==&quot;NY&quot;?&quot;selected&quot;:null ?>>New York</option>
    			<option value=&quot;NC&quot; <?php echo $state==&quot;NC&quot;?&quot;selected&quot;:null ?>>North Carolina</option>
    			<option value=&quot;ND&quot; <?php echo $state==&quot;ND&quot;?&quot;selected&quot;:null ?>>North Dakota</option>
    			<option value=&quot;OH&quot; <?php echo $state==&quot;OH&quot;?&quot;selected&quot;:null ?>>Ohio</option>
    			<option value=&quot;OK&quot; <?php echo $state==&quot;OK&quot;?&quot;selected&quot;:null ?>>Oklahoma</option>
    			<option value=&quot;OR&quot; <?php echo $state==&quot;OR&quot;?&quot;selected&quot;:null ?>>Oregon</option>
    			<option value=&quot;PA&quot; <?php echo $state==&quot;PA&quot;?&quot;selected&quot;:null ?>>Pennsylvania</option>
    			<option value=&quot;RI&quot; <?php echo $state==&quot;RI&quot;?&quot;selected&quot;:null ?>>Rhode Island</option>
    			<option value=&quot;SC&quot; <?php echo $state==&quot;SC&quot;?&quot;selected&quot;:null ?>>South Carolina</option>
    			<option value=&quot;SD&quot; <?php echo $state==&quot;SD&quot;?&quot;selected&quot;:null ?>>South Dakota</option>
    			<option value=&quot;TN&quot; <?php echo $state==&quot;TN&quot;?&quot;selected&quot;:null ?>>Tennessee</option>
    			<option value=&quot;TX&quot; <?php echo $state==&quot;TX&quot;?&quot;selected&quot;:null ?>>Texas</option>
    			<option value=&quot;UT&quot; <?php echo $state==&quot;UT&quot;?&quot;selected&quot;:null ?>>Utah</option>
    			<option value=&quot;VT&quot; <?php echo $state==&quot;VT&quot;?&quot;selected&quot;:null ?>>Vermont</option>
    			<option value=&quot;VA&quot; <?php echo $state==&quot;VA&quot;?&quot;selected&quot;:null ?>>Virginia</option>
    			<option value=&quot;WA&quot; <?php echo $state==&quot;WA&quot;?&quot;selected&quot;:null ?>>Washington</option>
    			<option value=&quot;WV&quot; <?php echo $state==&quot;WV&quot;?&quot;selected&quot;:null ?>>West Virginia</option>
    			<option value=&quot;WI&quot; <?php echo $state==&quot;WI&quot;?&quot;selected&quot;:null ?>>Wisconsin</option>
    			<option value=&quot;WY&quot; <?php echo $state==&quot;WY&quot;?&quot;selected&quot;:null ?>>Wyoming</option>
    		</select>
    	</label>
    
        <label>
            <?php _e('Postal', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;postal&quot; value=&quot;<?php echo $postal ?>&quot;/>
        </label>
    
        <div class=&quot;clear&quot;></div>
    
    <?php
    }
    
    add_action('profile_update', 'student_profile_update');
    function student_profile_update($user_id)
    {
    	$student_address = isset($_POST['student_address']) ? $_POST['student_address'] : null;
        if (!empty($student_address))
            update_user_meta($user_id, 'student_address', $student_address);
    
        $student_address2 = isset($_POST['student_address2']) ? $_POST['student_address2'] : null;
        if (!empty($student_address2))
            update_user_meta($user_id, 'student_address2', $student_address2);
    
        $city = isset($_POST['city']) ? $_POST['city'] : null;
        if (!empty($city))
            update_user_meta($user_id, 'city', $city);
    
        $state = isset($_POST['state']) ? $_POST['state'] : null;
        if (!empty($state))
            update_user_meta($user_id, 'state', $state);
    
    	$phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : null;
        if (!empty($phone))
            update_user_meta($user_id, 'student_phone', $phone);
    
    	$dob = isset($_POST['student_dob']) ? $_POST['student_dob'] : null;
        if (!empty($dob))
            update_user_meta($user_id, 'student_dob', $dob);
    
    	$postal = isset($_POST['postal']) ? $_POST['postal'] : null;
        if (!empty($postal))
            update_user_meta($user_id, 'postal', $postal);
    
    }
    
    // Add fields to the registration form
    add_action('coursepress_after_all_signup_fields', 'custom_field_cp_signup');
    function custom_field_cp_signup()
    {
        $phone = isset($_POST['student_phone']) ? $_POST['student_phone'] : null;
        $student_address = isset($_POST['student_address']) ? $_POST['student_address'] : null;
        $student_address2 = isset($_POST['student_address2']) ? $_POST['student_address2'] : null;
        $city = isset($_POST['city']) ? $_POST['city'] : null;
        $state = isset($_POST['state']) ? $_POST['state'] : null;
        $postal = isset($_POST['postal']) ? $_POST['postal'] : null;
        $dob = isset($_POST['student_dob']) ? $_POST['student_dob'] : null;
        ?>
        <label>
            <?php _e('Phone', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;student_phone&quot; value=&quot;<?php echo $phone ?>&quot;/>
        </label>
        <label>
            <?php _e('Birthday (MM/DD/YYYY)', 'cp'); ?>:
            <input id=&quot;student_dob&quot; name=&quot;student_dob&quot; type=&quot;text&quot; class=&quot;text&quot; value=&quot;<?php echo $dob ?>&quot;/>
        </label>
        <div class=&quot;clear&quot;></div>
        <label>
            <?php _e('Street Address', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;student_address&quot; value=&quot;<?php echo $student_address ?>&quot;/>
        </label>
        <label>
            <?php _e('Street Address 2', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;student_address2&quot; value=&quot;<?php echo $student_address2 ?>&quot;/>
        </label>
        <label>
            <?php _e('City', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;city&quot; value=&quot;<?php echo $city ?>&quot;/>
        </label>
    	<label>
    		<?php _e('State', 'cp'); ?>:
    		<select name=&quot;state&quot;>
    			<option value=&quot;AL&quot; <?php echo $state==&quot;AL&quot;?&quot;selected&quot;:null ?>>Alabama</option>
    			<option value=&quot;AK&quot; <?php echo $state==&quot;AK&quot;?&quot;selected&quot;:null ?>>Alaska</option>
    			<option value=&quot;AZ&quot; <?php echo $state==&quot;AZ&quot;?&quot;selected&quot;:null ?>>Arizona</option>
    			<option value=&quot;AR&quot; <?php echo $state==&quot;AR&quot;?&quot;selected&quot;:null ?>>Arkansas</option>
    			<option value=&quot;CA&quot; <?php echo $state==&quot;CA&quot;?&quot;selected&quot;:null ?>>California</option>
    			<option value=&quot;CO&quot; <?php echo $state==&quot;CO&quot;?&quot;selected&quot;:null ?>>Colorado</option>
    			<option value=&quot;CT&quot; <?php echo $state==&quot;CT&quot;?&quot;selected&quot;:null ?>>Connecticut</option>
    			<option value=&quot;DE&quot; <?php echo $state==&quot;DE&quot;?&quot;selected&quot;:null ?>>Delaware</option>
    			<option value=&quot;DC&quot; <?php echo $state==&quot;DC&quot;?&quot;selected&quot;:null ?>>District Of Columbia</option>
    			<option value=&quot;FL&quot; <?php echo $state==&quot;FL&quot;?&quot;selected&quot;:null ?>>Florida</option>
    			<option value=&quot;GA&quot; <?php echo $state==&quot;GA&quot;?&quot;selected&quot;:null ?>>Georgia</option>
    			<option value=&quot;HI&quot; <?php echo $state==&quot;HI&quot;?&quot;selected&quot;:null ?>>Hawaii</option>
    			<option value=&quot;ID&quot; <?php echo $state==&quot;ID&quot;?&quot;selected&quot;:null ?>>Idaho</option>
    			<option value=&quot;IL&quot; <?php echo $state==&quot;IL&quot;?&quot;selected&quot;:null ?>>Illinois</option>
    			<option value=&quot;IN&quot; <?php echo $state==&quot;IN&quot;?&quot;selected&quot;:null ?>>Indiana</option>
    			<option value=&quot;IA&quot; <?php echo $state==&quot;IA&quot;?&quot;selected&quot;:null ?>>Iowa</option>
    			<option value=&quot;KS&quot; <?php echo $state==&quot;KS&quot;?&quot;selected&quot;:null ?>>Kansas</option>
    			<option value=&quot;KY&quot; <?php echo $state==&quot;KY&quot;?&quot;selected&quot;:null ?>>Kentucky</option>
    			<option value=&quot;LA&quot; <?php echo $state==&quot;LA&quot;?&quot;selected&quot;:null ?>>Louisiana</option>
    			<option value=&quot;ME&quot; <?php echo $state==&quot;ME&quot;?&quot;selected&quot;:null ?>>Maine</option>
    			<option value=&quot;MD&quot; <?php echo $state==&quot;MD&quot;?&quot;selected&quot;:null ?>>Maryland</option>
    			<option value=&quot;MA&quot; <?php echo $state==&quot;MA&quot;?&quot;selected&quot;:null ?>>Massachusetts</option>
    			<option value=&quot;MI&quot; <?php echo $state==&quot;MI&quot;?&quot;selected&quot;:null ?>>Michigan</option>
    			<option value=&quot;MN&quot; <?php echo $state==&quot;MN&quot;?&quot;selected&quot;:null ?>>Minnesota</option>
    			<option value=&quot;MS&quot; <?php echo $state==&quot;MS&quot;?&quot;selected&quot;:null ?>>Mississippi</option>
    			<option value=&quot;MO&quot; <?php echo $state==&quot;MO&quot;?&quot;selected&quot;:null ?>>Missouri</option>
    			<option value=&quot;MT&quot; <?php echo $state==&quot;MT&quot;?&quot;selected&quot;:null ?>>Montana</option>
    			<option value=&quot;NE&quot; <?php echo $state==&quot;NE&quot;?&quot;selected&quot;:null ?>>Nebraska</option>
    			<option value=&quot;NV&quot; <?php echo $state==&quot;NV&quot;?&quot;selected&quot;:null ?>>Nevada</option>
    			<option value=&quot;NH&quot; <?php echo $state==&quot;NH&quot;?&quot;selected&quot;:null ?>>New Hampshire</option>
    			<option value=&quot;NJ&quot; <?php echo $state==&quot;NJ&quot;?&quot;selected&quot;:null ?>>New Jersey</option>
    			<option value=&quot;NM&quot; <?php echo $state==&quot;NM&quot;?&quot;selected&quot;:null ?>>New Mexico</option>
    			<option value=&quot;NY&quot; <?php echo $state==&quot;NY&quot;?&quot;selected&quot;:null ?>>New York</option>
    			<option value=&quot;NC&quot; <?php echo $state==&quot;NC&quot;?&quot;selected&quot;:null ?>>North Carolina</option>
    			<option value=&quot;ND&quot; <?php echo $state==&quot;ND&quot;?&quot;selected&quot;:null ?>>North Dakota</option>
    			<option value=&quot;OH&quot; <?php echo $state==&quot;OH&quot;?&quot;selected&quot;:null ?>>Ohio</option>
    			<option value=&quot;OK&quot; <?php echo $state==&quot;OK&quot;?&quot;selected&quot;:null ?>>Oklahoma</option>
    			<option value=&quot;OR&quot; <?php echo $state==&quot;OR&quot;?&quot;selected&quot;:null ?>>Oregon</option>
    			<option value=&quot;PA&quot; <?php echo $state==&quot;PA&quot;?&quot;selected&quot;:null ?>>Pennsylvania</option>
    			<option value=&quot;RI&quot; <?php echo $state==&quot;RI&quot;?&quot;selected&quot;:null ?>>Rhode Island</option>
    			<option value=&quot;SC&quot; <?php echo $state==&quot;SC&quot;?&quot;selected&quot;:null ?>>South Carolina</option>
    			<option value=&quot;SD&quot; <?php echo $state==&quot;SD&quot;?&quot;selected&quot;:null ?>>South Dakota</option>
    			<option value=&quot;TN&quot; <?php echo $state==&quot;TN&quot;?&quot;selected&quot;:null ?>>Tennessee</option>
    			<option value=&quot;TX&quot; <?php echo $state==&quot;TX&quot;?&quot;selected&quot;:null ?>>Texas</option>
    			<option value=&quot;UT&quot; <?php echo $state==&quot;UT&quot;?&quot;selected&quot;:null ?>>Utah</option>
    			<option value=&quot;VT&quot; <?php echo $state==&quot;VT&quot;?&quot;selected&quot;:null ?>>Vermont</option>
    			<option value=&quot;VA&quot; <?php echo $state==&quot;VA&quot;?&quot;selected&quot;:null ?>>Virginia</option>
    			<option value=&quot;WA&quot; <?php echo $state==&quot;WA&quot;?&quot;selected&quot;:null ?>>Washington</option>
    			<option value=&quot;WV&quot; <?php echo $state==&quot;WV&quot;?&quot;selected&quot;:null ?>>West Virginia</option>
    			<option value=&quot;WI&quot; <?php echo $state==&quot;WI&quot;?&quot;selected&quot;:null ?>>Wisconsin</option>
    			<option value=&quot;WY&quot; <?php echo $state==&quot;WY&quot;?&quot;selected&quot;:null ?>>Wyoming</option>
    		</select>
    	</label>
    
        <label>
            <?php _e('Postal', 'cp'); ?>:
            <input type=&quot;text&quot; name=&quot;postal&quot; value=&quot;<?php echo $postal ?>&quot;/>
        </label>
    
        <div class=&quot;clear&quot;></div>
    
    <?php
    }
    
    add_action('user_register', 'student_signup');
    function student_signup($user_id)
    {
    
        $phone = isset($_POST['phone']) ? $_POST['phone'] : null;
        update_user_meta($user_id, 'phone', $phone);
    
        $dob = isset($_POST['student_dob']) ? $_POST['student_dob'] : null;
        update_user_meta($user_id, 'student_dob', $dob);
    
        $student_address = isset($_POST['student_address']) ? $_POST['student_address'] : null;
        update_user_meta($user_id, 'student_address', $student_address);
    
        $student_address2 = isset($_POST['student_address2']) ? $_POST['student_address2'] : null;
        update_user_meta($user_id, 'student_address2', $student_address2);
    
        $city = isset($_POST['city']) ? $_POST['city'] : null;
        update_user_meta($user_id, 'city', $city);
    
        $state = isset($_POST['state']) ? $_POST['state'] : null;
        update_user_meta($user_id, 'state', $state);
    
        $postal = isset($_POST['postal']) ? $_POST['postal'] : null;
        update_user_meta($user_id, 'postal', $postal);
    }

    The site isn't live so can't send a link but attached a screen grab of what it looks like.

  • Hoang Ngo

    @Danny Albeck,

    I hope you are well today.

    I've checked the code, look like this case, we need to modify plugin's code. File /coursepress/includes/classes/class.shortcodes.php line 3850, you will see a code like this

    <?php
    								if ( shortcode_exists( 'signup-tos' ) ) {
    									if ( get_option( 'show_tos', 0 ) == '1' ) {
    										?>
    										<label class="full"><?php echo do_shortcode( '[signup-tos]' ); ?></label>
    										<?php
    									}
    								}
    								?>
    
    								<?php do_action( 'coursepress_after_all_signup_fields' ); ?>

    What we need to do is swap the position, so let the TOS shortcode go below the coursepress_after_all_signup_fields hook

    <?php do_action( 'coursepress_after_all_signup_fields' ); ?>
    								<?php
    								if ( shortcode_exists( 'signup-tos' ) ) {
    									if ( get_option( 'show_tos', 0 ) == '1' ) {
    										?>
    										<label class="full"><?php echo do_shortcode( '[signup-tos]' ); ?></label>
    										<?php
    									}
    								}
    								?>

    This will resolve your issue

    Best regards,
    Hoang

  • Hoang Ngo

    @ Danny Albeck,

    For now, the only thing I think can work is using javascript. The idea is you move the whole TOS block, and place it before the Create An Account button.

    Please check this nice article http://www.elated.com/articles/jquery-removing-replacing-moving-elements/, it will give you some ideas . Or you can send the register page link to me, I will check and make a small script for you

    Best regards,
    Hoang