How to get field contents from import records form?

A place for users and developers of the Xataface to discuss and receive support.

How to get field contents from import records form?

Postby 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
lblanc
 
Posts: 9
Joined: Mon Dec 08, 2008 7:07 am

Postby 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

}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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
lblanc
 
Posts: 9
Joined: Mon Dec 08, 2008 7:07 am

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: Google [Bot] and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved