Example: user uploads an image, in the "Upload Files > On Success" I want to display the name of the new name of file (the one chronoforms just renamed it to with all the numbers at the front).
Forums
How to access field values in events
Example: user uploads an image, in the "Upload Files > On Success" I want to display the name of the new name of file (the one chronoforms just renamed it to with all the numbers at the front).
From the Uplaod Files Help tab:
Files data will be stored after processing under the $form->files AND $form->data['_PLUGINS_']['upload_files'].
You can add a "Custom code" action after this one and use this code to check/user the response data stored : print_r2($form->data['_PLUGINS_']['upload_files']);
If you use my custom action [url=http://greyhead.net/how-to-docs/chronoforms-v4-actions]Upload Files [GH[/url] ] there are a few more variables stored:
The file data will be made available in a series of form data values: the file name in {input_name}; the file size in {input_name_size}; the file size in {input_name_url}; and the file url in {input_name_url}. In each case replace input_name with the name of the input in your form e.g. {input_file_0_path}
File data will also be saved in the $form->files and $form->data['_PLUGINS_']['upload_files'] arrays. You can add a "Custom code" action after this one and use this code to check the response data stored: print_r($form->data['_PLUGINS_']['upload_files']);
Bob