add_action('cred_before_save_data', 'func_check_and_adjust_number',10,1);
function func_check_and_adjust_number($form_data) {
// if a specific form
if ($form_data['id']==99999) {
if (isset($_POST['field-slug']) and $_POST['field-slug']>100) {
$_POST['field-slug'] = 99;
}
}
}
Where:
- Replace 99999 with your original form ID.
- you should adjust the code as required
So, you should check the field value before its get saved to database and adjust it as per your requirement.