Page 1 of 1
How to get field contents from import records form?

Posted:
Wed Feb 04, 2009 7:46 am
by lblanc
First of all, let me compliment you for that fantastic application!
I'd like to know how to get the content value of 'upload' field in the import records form in order to use it in the __import__ function of the delegate class.
Thanks,
Lionel

Posted:
Wed Feb 04, 2009 8:33 am
by shannah
The first parameter of the function contains the data that is provided either from the upload field or the text area:
- Code: Select all
function __import__csv(&$data, $defaultValues=array()){
// $data contains the contents of the file that was uploaded
}

Posted:
Wed Feb 04, 2009 8:40 am
by lblanc
Probably my poor English was source of misunderstanding. I'd like to get the absolute file name which has been filled in the upload field (via the browse button).
Thanks,
Lionel

Posted:
Wed Feb 04, 2009 8:47 am
by shannah
I'll have to check closer, but I don't believe that it tracks this information. Just the file data. On the "preview" page you could probably glean the information from the $_FILES super global, but this won't be there on the second step (when you confirm the import).
-Steve