Hide field on course creation

Home Forums Legacy Support Support queries How-to & Troubleshooting Hide field on course creation

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #365286
    silverchair
    Spectator
    I want to hide these field on frontend course creation only for Instructor Account, can I hide it by code? thanks Refer: https://prnt.sc/1bi16o1
    #365333
    Veronica
    Moderator
    ah! yes possible but i need to check the code please ping me tomorrrow
    #365453
    silverchair
    Spectator
    any update @Veronica ? thx
    #365683
    Veronica
    Moderator
    hi as the previous provided custom for instructor only is not working on your site first we will work on that then move with other request because then it will create mess as soon as that will fix i will pick up your all topic links one by one and provide code accordingly i hope you understand
    #365713
    silverchair
    Spectator
    Okay, thanks for pointing this before provide me a code. Some of your code not works before, but you're always successfully provide me the updated code and make it works. So you have my trust on this. Thanks for your effort @Veronica
    #365799
    Veronica
    Moderator
    @alex has provided the updated code on your another topic please check and confirm if it is working there or not so we can proceed
    #365868
    silverchair
    Spectator
    on this topic: https://wplms.io/support/forums/topic/restrict-instructor-change-course-status-not-works/ Yes, it works! Please proceed to another request, thx before
    #366093
    Veronica
    Moderator
    hi add this: `add_filter('wplms_course_creation_tabs',function($tabs, $course_id=null, $user_id=null){ if($user_id && !user_can($user_id,'manage_options') || true){ $fields = $tabs['create_course']['fields']; foreach ($fields as $key => $field) { if($field['id'] == 'vibe_course_auto_eval'){ $field['is_child'] = false; } if($field['id'] == 'vibe_duration' || $field['id'] == 'vibe_max_students' || $field['id'] == 'vibe_start_date'){ //array_splice($curriculum_element['types'], 6,3); if($field['id'] == 'vibe_duration'){ $field['children'] = []; } }else{ $new_arr[] = $field; } } $tabs['create_course']['fields'] = $new_arr; } return $tabs; },10,3);`
    #366365
    silverchair
    Spectator
    not works, refer: https://prnt.sc/1fk7wuk
    #366425
    Veronica
    Moderator
    let me check this on your site
    #366426
    Veronica
    Moderator
    hi i have checked this as I have mentioned in my previous replies on any of your topics that when we copy the code then the ' ' text changed I have retyped it on your site and now it is working on your site please check and confirm
    #366748
    silverchair
    Spectator
    any update?
    #366770
    Veronica
    Moderator
    This reply has been marked as private.
    #367045
    silverchair
    Spectator
    Yes now it works, thanks @Veronica. U can close it
    #367117
    Veronica
    Moderator
    thanks for your confirmation
Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Hide field on course creation’ is closed to new replies.