• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Post to Location (Silent Post) files problem

Post to Location (Silent Post) files problem 8 years 10 months ago #31572

  • waltmayo
  • waltmayo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
If a form has a FILE field requesting a file upload, the "Post to Location (Silent Post) function doesn't include information about the FILE field in the POST or GET. Other fields have variables passed along, but not the FILE field. Is it possible to do this?

I'm wanting to populate an external form that will track uploads for reporting, but I need to capture the URL to the individual files so the reports can include download links.

Walt
The administrator has disabled public write access.

Post to Location (Silent Post) files problem 8 years 10 months ago #31581

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

File information is stored within $_FILES variable and not $_POST nor $_GET.

You can try similar steps on this:

- add a hidden field to your form.

- within "Scripts Called after Form has been processed" area (while editing your form > Properties > PHP Scripts), you can add (example):
list($replace, $with) = RSFormProHelper::getReplacements($SubmissionId);
$uploadPath = str_replace($replace, $with, '{myFileUpload:path}');
$post['myHiddenField'] = $uploadPath;

- replace accordingly from the script:

myFileUpload - with your File Upload element exact name.

myHiddenField - with your hidden field exact name.

The script will basically add the full path to your uploaded file within the hidden field value that is sent via Silent Post.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Post to Location (Silent Post) files problem 8 years 10 months ago #31586

  • waltmayo
  • waltmayo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Thank you SOOOOO much. This worked PERFECTLY!!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!