How to get field contents from import records form?
Archived from the Xataface Users forum.
lblanc — Wed Feb 04, 2009 7:46 am
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
shannah — Wed Feb 04, 2009 8:33 am
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}`
lblanc — Wed Feb 04, 2009 8:40 am
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
shannah — Wed Feb 04, 2009 8:47 am
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