2

Using this code

if ($fields["custom_111_79"] == 0) $errors["custom_111_79"] = "Please enter number of physio sessions";

The evaluation is done correctly, but the error message does not appear against the custom field, but instead as a general error message top right of the screen.

This is in civi_case.

Is this supposed to work? Is there another way of making custom fields work like normal fields?

2
  • The "79" is going to change for different records, and on a new form will be "-1". Also try it with just custom_111 when you set $errors.
    – Demerit
    Commented Nov 26, 2019 at 16:39
  • Yes, aware of the changing suffix, and removing it makes no difference. Commented Nov 27, 2019 at 8:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.