How to get the list of uploaded files with this PHP

Retrieve uploaded files list in ChronoForms v6.

Overview

The problem is that the PHP code to access uploaded files changed from CFv5 to CFv6.
Use the get method with the action name instead of the files property or var method.

Answered
ChronoForms v6
sh shiluba 10 Dec, 2019
Hi,
With CFv5, after a File upload action , I could get an array of all the uploaded files with this PHP code :
$form->files
With CFv6, it does not work with :
$this->files
Does anybody know how to get this information with PHP ?
he healyhatman 11 Dec, 2019
$this->data('fieldname')
If you've done the upload action then you'll want
$this->var('action_name')
sh shiluba 11 Dec, 2019
In my case, it should be
$this->var('action_name')
But it gives me this error :
0 Call to undefined method G2\L\View::var()
This error still shows up after I re-installed CFv6. I'm stuck. How can I fix that ?
sh shiluba 11 Dec, 2019
Answer
No problem. It works like a charm with
$this->get('action_name')
Thank you🙂
This topic is locked and no more replies can be posted.