HOW TO add extra hidden fields to uploader's form?

Discuss everything related to File Uploader. All versions. Any questions related to the File Uploader developing or using should be posted to this forum.

Moderators: alexandrleonenko, Milton

Milton
Senior
Senior
Posts: 31
Joined: Jan 14th, '10, 14:17

HOW TO add extra hidden fields to uploader's form?

Postby Milton » Nov 30th, '11, 18:33

To add an extra hidden field to uploader's form please do the following:
1) Find static function DisplayForm in the fileuploader.class.php file. Here you can add your field.

Code: Select all

// FIND THIS LINE
$output.= "\n<input type='hidden' name='userandomnames' value='".$usingRandomNames."' />";
// ADD YOURS JUST BELOW IT
$output.= "\n<input type='hidden' name='your_field' value='innuendo' />";

2) Now you'll be able to access it in inc/upload_result.php file as $_POST["your_field"]

Return to “ApPHP AJAX File Uploader”