function buildQuickForm() { // add form elements $this->add('select', 'securefiles_backend_service', 'Backend Service Provider', CRM_Securefiles_Hooks::getBackendServices(), true); //Allow the Backend service to add fields if ($this->backend_service) { $this->backend_service->buildSettingsForm($this); } $this->addButtons(array(array('type' => 'submit', 'name' => ts('Save Settings'), 'isDefault' => TRUE))); //Add our JS to the Page CRM_Core_Resources::singleton()->addScriptFile('com.ginkgostreet.securefiles', 'js/securefiles_settings.js', 19, 'page-footer'); // export form elements $pageElements = $this->getRenderableElementNames(); $serviceIndex = array_search("securefiles_backend_service", $pageElements); if (is_numeric($serviceIndex)) { unset($pageElements[$serviceIndex]); } $this->assign('elementNames', $pageElements); parent::buildQuickForm(); }