Title: Function.php not working (Required upload files and Checkbox fields)
Last modified: May 28, 2020

---

# Function.php not working (Required upload files and Checkbox fields)

 *  Resolved [nendara](https://wordpress.org/support/users/nendara/)
 * (@nendara)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/function-php-not-working-required-upload-files-and-checkbox-fields/)
 * I am adding special custom fields such as Upload file (Instructors CV) and a 
   checkbox to accept terms and conditions in the instructor registration form.
 * As seen in the link, my html code is working:
 *     ```
       <div class="tutor-form-col-6">
                   <div class="tutor-form-group">
                       <input type="checkbox" id="aceptar" name="aceptar"
                checked> <p>Hola. ¿Queréis visitar el sitio web <a href="http://www.google.com">Google</a>?
   
                   </div>
               </div>
   
           </div>
   
                <div class="tutor-form-row"> 
               <div class="tutor-form-col-6">
                   <div class="tutor-form-group">
                       <label for="cv_no">Selecciona un archivo con tu CV:</label>
                       <input type="file" id="cv_no" name="cv_no">
   
                   </div>
               </div>  
       ```
   
 * Now. I need help in making them work. I have these function.php files but they
   don’t work:
 *     ```
       }
           add_filter('tutor_instructor_registration_required_fields', 'required_checkbox_callback');
       if ( ! function_exists('required_checkbox_callback')){
           function required_checkbox_callback($atts){
               $atts['check_no'] = 'Debes aceptar el checkbox para continuar';
               return $atts;
           }
       }
       add_filter('tutor_instructor_registration_required_fields', 'required_cv_no_callback');
       if ( ! function_exists('required_cv_no_callback')){
           function required_cv_no_callback($atts){
               $atts['cv_no'] = 'Debes Subir tu CV';
               return $atts;
           }
       }
       add_action('user_register', 'add_cv_after_user_register');
       add_action('profile_update', 'add_cv_after_user_register');
       if ( ! function_exists('add_cv_after_user_register')) {
           function add_cv_after_user_register($user_id){
   
               }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffunction-php-not-working-required-upload-files-and-checkbox-fields%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Sekander Badsha](https://wordpress.org/support/users/badsha_eee/)
 * (@badsha_eee)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/function-php-not-working-required-upload-files-and-checkbox-fields/#post-12960977)
 * Hello [@nendara](https://wordpress.org/support/users/nendara/),
 * Did you get this to work? If not, I would suggest you to hire a developer. We
   do not have the resources to help with custom development at this moment.

Viewing 1 replies (of 1 total)

The topic ‘Function.php not working (Required upload files and Checkbox fields)’
is closed to new replies.

 * ![](https://ps.w.org/tutor/assets/icon-256x256.gif?rev=3193875)
 * [Tutor LMS - eLearning and online course solution](https://wordpress.org/plugins/tutor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tutor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tutor/)
 * [Active Topics](https://wordpress.org/support/plugin/tutor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tutor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tutor/reviews/)

## Tags

 * [forms](https://wordpress.org/support/topic-tag/forms/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [tutor lms](https://wordpress.org/support/topic-tag/tutor-lms/)

 * 1 reply
 * 2 participants
 * Last reply from: [Sekander Badsha](https://wordpress.org/support/users/badsha_eee/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/function-php-not-working-required-upload-files-and-checkbox-fields/#post-12960977)
 * Status: resolved