1

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?

  • 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 Nov 26 '19 at 16:39
  • Yes, aware of the changing suffix, and removing it makes no difference. – Simon Walden Nov 27 '19 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.