Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->add('File', 'uploadFile', ts('Import Data File'), 'size=30 maxlength=255', TRUE);
- public function preProcess()
- {
- if (isset($this->_submitFiles['uploadFile'])) {
- $uploadFile = $this->_submitFiles['uploadFile'];
- $importer = new CRM_Importer();
- $importer ->truncate();
- $importer -> importCVStoTable($uploadFile['tmp_name']);
- }
- }
Add Comment
Please, Sign In to add comment