Custom field in create course section saving issue

Home Forums Legacy Support Support queries How-to & Troubleshooting Custom field in create course section saving issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #192592
    gsjaak
    Spectator
    Hi! I have writen some code to get a few custom fields in the front end create course section. I want to insert them in the first panel (create course). The fields get displayed, however for some reason they do not save their information. Even stranger thing: when I place the field in the settings panel (by changing [create_course] to [course_settings]), the fields do save. It does not make sense though to have them there, how can I make this work? Here is the code:   add_filter('wplms_course_creation_tabs','add_in_front_end');   function add_in_front_end($settings){   $fields = $settings['create_course']['fields']; $arr=array(array( 'label' => __('label','wplms-front-end'), 'desc'  => __('desc','wplms-front-end'), 'text'=>__('Kenmerk 1:','wplms-front-end' ),/ 'id'  => 'vibe_usp1', 'type'  => 'text', ), array( 'text'=>__('Kenmerk 2:','wplms-front-end' ), 'id'  => 'vibe_usp2', 'type'  => 'text', ), array( 'text'=>__('Kenmerk 3:','wplms-front-end' ),/ 'id'  => 'vibe_usp3', 'type'  => 'text', ), array( 'text'=>__('Kenmerk 4:','wplms-front-end' ), 'id'  => 'vibe_usp4', 'type'  => 'text', ), );   array_splice( $settings['create_course']['fields'],2, 0, $arr ); return $settings; }     add_filter('wplms_course_metabox','custom_fileds'); add_filter('wplms_course_metabox','custom_fileds2'); add_filter('wplms_course_metabox','custom_fileds3'); add_filter('wplms_course_metabox','custom_fileds4');   function custom_fileds($usp1){ $prefix = 'vibe_'; $usp1[]=array( 'label' => __('Custom item menu','vibe-customtypes'), 'desc'  => __('Put description','vibe-customtypes'), 'id'    => $prefix.'usp1', 'type'  => 'text' ); return $usp1; }     function custom_fileds2($usp2){ $prefix = 'vibe_'; $usp2[]=array( // Text Input 'label' => __('Custom item menu','vibe-customtypes'), 'desc'  => __('Put description','vibe-customtypes'), 'id'    => $prefix.'usp2', 'type'  => 'text' ); return $usp2;   } function custom_fileds3($usp3){ $prefix = 'vibe_'; $usp3[]=array( // Text Input 'label' => __('Custom item menu','vibe-customtypes'), 'desc'  => __('Put description','vibe-customtypes'), 'id'    => $prefix.'usp3', 'type'  => 'text' ); return $usp3;   } function custom_fileds4($usp4){ $prefix = 'vibe_'; $usp4[]=array( 'label' => __('Custom item menu','vibe-customtypes'), 'desc'  => __('Put description','vibe-customtypes'), 'id'    => $prefix.'usp4', 'type'  => 'text' ); return $usp4; }  
    #192717
    logan
    Member
    My apologies. this is not possible in course section. you have to put it in setting only then data will be saved.
    #192732
    gsjaak
    Spectator
    Ah too bad, thanks for getting back
    #192800
    logan
    Member
    thanks for confirming. closing this topic.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom field in create course section saving issue’ is closed to new replies.