• Resolved hiStrat76

    (@histrat76)


    Hi,

    I’m trying to make all attributes on the submission form required fields. I’ve created this function, the warning error appears correctly, but continues to appear even if the user fills in all the attribute fields. Is there another step to making attributes required fields? A similar function to this works for making the categories required:

    function em_validate_2($result, $EM_Event){
     if (!is_user_logged_in() && $_REQUEST['event_attributes'] == ''){
      $EM_Event->add_error('Required...');
      $result = false;
     }
    
     return $result;
    }
    add_filter('em_event_validate','em_validate_2', 1, 2);

    Thanks for your help,
    Anne

    https://www.ads-software.com/plugins/events-manager/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Make all attributes required’ is closed to new replies.