Commit 54f3f985 authored by Pradeep Nayak's avatar Pradeep Nayak

check if field exists on form

parent 7a9eb121
......@@ -129,6 +129,11 @@ function activitylocationselect_civicrm_buildForm($formName, &$form) {
return;
}
// Incase of deleting activity location field is not present
if (!$form->elementExists('location')) {
return;
}
// Replace the activity location text field with a select field
$form->removeElement('location');
$locations = civicrm_api3('OptionValue', 'get', [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment