How to require custom fields How to require custom fields
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

How to require custom fields

Started by aszasz, January 25, 2005, 09:00:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aszasz

I would like to require users who upload photos to complete the first of the four custom fields ('user1' in database, '$user_field1_name' in code).  If they do not complete custom field 1 when they upload a photo, they will see an error message and will not be allowed to upload that file (however, they can return to the upload page and try again).

I am deep into the code of the file: upload.php (beautifully written and commented code, by the way - a pleasure to work with).  I have located the error-checking section of the code (starting around line 1140).  My question is, at this point in the code, where are the custom field values kept?  They are not in the file_upload_array, nor are they, obviously, in the escrow_array yet, nor are they in the database (duh).  Can I get them from $_POST or $_GET?  

Where can I find the value of $user_field1_name at this point in the code so that I can check to make sure it's not empty?

Thanks in advance for any help.