add_action('job_bm_company_submit_form', 'job_bm_company_submit_form_19082019'); function job_bm_company_submit_form_19082019(){ ?> <div class="form-field-wrap"> <div class="field-title"><?php echo __('Custom input field','job-board-manager-company-profile'); ?></div> <div class="field-input"> <input placeholder="" type="text" value="" name="custom_input"> <p class="field-details"><?php echo __('Custom input details.','job-board-manager-company-profile'); ?> </p> </div> </div> <?php }
add_filter('job_bm_company_submit_errors','job_bm_company_submit_errors_19082019', 90,2); function job_bm_company_submit_errors_19082019( $error, $post_data){ if(empty($post_data['custom_input'])){ $error->add( 'custom_input', __( 'ERROR: Custom input is empty.', 'job-board-manager-company-profile' ) ); } return $error; }