Advertisement
Guest User

Untitled

a guest
Mar 24th, 2023
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. add_filter('frm_validate_entry', 'fc_validateSave', 20, 2);
  2. function fc_validateSave($errors, $values){
  3. if ($values['form_id'] == ) {
  4. // if it's a draft, no need for errors
  5. $is_draft = $_POST['item_meta'][FrmField::get_id_by_key('is_draft')];
  6. if ($is_draft == "Yes") {
  7. return array();
  8. }
  9. }
  10. return $errors;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement