• 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: Manually Validating File Upload Field

Manually Validating File Upload Field 12 years 9 months ago #18120

Does anyone know how to get the details of what's been entered into a file upload field on the $_POST form data?

I have set up a form at se2.testcms.co.uk/beeline-form (first 3 pages of validation turned off for now)

A user can upload between 1 and 5 designs. If they choose 1 design they go the page to upload 1 design, if they choose 4 designs they go to a page that has 4 upload buttons for their 4 designs.

So if they choose 1 then they MUST fill in the one, but if they choose 4 they MUST fill in those 4, but of course they will not be filling in anything on the other 'upload' pages.

This means I must validate the fields myself using js and this www.rsjoomla.com/support/documentation/v...602-php-scripts.html works brilliantly on the radio button but NOT on the upload field as it does not come through on the $_POST data!

I have set up the 1 image only and it does email and go into the DB when the show $_POST data is turned off.

Thanks :)
The administrator has disabled public write access.

Re: Manually Validating File Upload Field 12 years 9 months ago #18235

This worked beautifully for me

if(empty($_FILES)) $invalid[] = RSFormProHelper::getComponentId("upload_field_name");

Thanks to the RS Team :)
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!