Batch name – Unique

Home Forums WPLMS AddOns WPLMS Batches Batch name – Unique

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #154704
    razvan.stoichita
    Spectator
    is there a way to make the batch name be unique ?  Do you guys have any code for this ?   client wants to create batches with different names (right now the batches can be added with the same name and only the slug is different).    
    #154959
    Anshuman Sahu
    Keymaster
    Please try adding this given code in your wplms-customizer.php file in wplms customizer plugin : add_filter('groups_group_name_before_save','mygroups_group_name_before_save',10,1); function mygroups_group_name_before_save($group_name){   if (! bp_is_active( 'groups' ) )     return $group_name;    if ( bp_has_groups() ) :   while (bp_groups() ) : bp_the_group();       $name =bp_group_name() ;           if( $name =$group_name){       $error = "name already exists";       wp_die($error) ;     }     break;     endwhile;     endif;   }
    #155798
    razvan.stoichita
    Spectator
    Hi Alex, i have not tried this code yet but I will. Can you provide a similar code to make a Custom Profile Field be unique ? e.g.    I have a custom profile field named "student_license_number" (this is their Driver License number) and has to be unique. This is used in one of the registration forms ( Student Registration)   thanks.
    #155937
    Anshuman Sahu
    Keymaster
    You can use third party plugins available on wordpress.org for this .
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Batch name – Unique’ is closed to new replies.