I have a CiviCRM profile that hosts a custom field. The custom field is of type "Radio-Button" and hosts two options:
What I'm trying to achieve is changing the values of each option programmatically when the form gets built. According to the hook reference, the
buildForm hook should be used for doing such changes.
I know it's possible to change default values for simple input fields, it can be done by calling the
$form->setDefaults( $defaults ) function. But how does one modify more complicated HTML form elements such as radio buttons?
I browsed the
CRM_Core_Form PHP class reference and cannot find the appropriate functions.