/** * Build the form object. * * @return void */ public function preProcess() { $this->_exportColumnCount = $this->get('exportColumnCount'); $this->_mappingId = $this->get('mappingId'); if (!$this->_exportColumnCount) { // Set default from saved mapping if ($this->_mappingId) { $mapping = new CRM_Core_DAO_MappingField(); $mapping->mapping_id = $this->_mappingId; $this->_exportColumnCount = $mapping->count(); } else { $this->_exportColumnCount = 10; } } else { $this->_exportColumnCount += 10; } }