What you're looking for is some kind of xmlhttprequest to getImportfields
I'd create a new browserview that returns getImportfields (the example below could be added to your configure.zcml to create a view called "import-fields":
You don't need a template.
This view would be accessible via @@import-fields
This could then be called via an xmlhttprequest in your tal template.