CiviCRM Asked by Jon G - Megaphone Tech on August 30, 2021
When you set a default value for a custom field, it only exists at the form level. Is there a practical way to enforce them at the database level? For instance, by altering the SQL table definition?
I understand that a custom field record isn’t created under every circumstance, but if I account for that (e.g. another custom field in that group is always populated) is altering the SQL practical?
Hang on, there is a default_value column in the civicrm_custom_field table? I would assume changing that value would actually work....
Answered by ErikH - CiviCooP on August 30, 2021
A possible downside, although unlikely, is an upgrade might do some kind of batch modify on all custom fields that would wipe your default value.
What are you trying to do that can't be done with a hook or trigger?
Answered by Demerit on August 30, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP