PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   How Do I? - vBulletin 3.0.X (http://www.photopost.com/forum/how-do-i-vbulletin-3-0-x/)
-   -   Force All Fields To Be Required On Upload Form? (http://www.photopost.com/forum/how-do-i-vbulletin-3-0-x/118180-force-all-fields-required-upload-form.html)

kderentz April 22nd, 2005 10:58 AM

Force All Fields To Be Required On Upload Form?
 
Can anyone help me out on this? I'm using the gallery so people can up load images of their cars, but I want to force them to fill out all fields on the upload and quick upload form.

For example I want to make these fields required:

Title (which I changed to Make & Model)
Description
Keywords

If the user dose not fill them out then I dont want the form to allow the imge to be uploaded and it give the user a warning saying "All required fields have not been filled out".

Thanks for any help anyone can offer!

Brian April 22nd, 2005 11:17 AM

Re: Force All Fields To Be Required On Upload Form?
 
If you'll look in your /forum/includes/functions_gallery_imageedit.php file for this:
Code:

Content visible to verified customers only.
And add this right above it:
Code:

Content visible to verified customers only.
Then that should do the trick.

kderentz April 22nd, 2005 12:32 PM

Re: Force All Fields To Be Required On Upload Form?
 
Tight!!!!!! .... Thank you so much !

kderentz April 22nd, 2005 12:51 PM

Re: Force All Fields To Be Required On Upload Form?
 
OK I added it and but now when I went to test it, even if I fill out all the fields its giveing me the error:

"A required field was missing. Please be sure to fill out all fields"

Here is the link to my upload form:

http://www.automotivegalleries.com/g...load.php?&c=29

I also have added additional fields using the custom fields in the CP.

The Three fields I added where "Make" and "Model" and "Modifications" as its and automotive site.

Here is the code I added to the functions_gallery_imageedit.php file:

Code:

Content visible to verified customers only.
I changed yours a little as I want to make the following fields required : Title, Keywords, Make, Model.

I think I messed something up as I'm not googd at php at all.

Brian April 22nd, 2005 01:19 PM

Re: Force All Fields To Be Required On Upload Form?
 
Sorry about that. Try changing the three places you see $image in that code to $imageinfo and it should work then.

kderentz April 22nd, 2005 01:38 PM

Re: Force All Fields To Be Required On Upload Form?
 
Here is the code I changed it to:

Code:

Content visible to verified customers only.
but I'm still getting that error ....

Could it be due to the custom fields???? is the code case sensitve ?

IF you go here and try it for your self you'll see what I mean:

http://www.automotivegalleries.com/g...upload.php?&c=

Brian April 22nd, 2005 01:47 PM

Re: Force All Fields To Be Required On Upload Form?
 
There was no reason to change 'title' and 'description'. Change those back to the exact code I posted and it should work fine.

kderentz April 22nd, 2005 01:56 PM

Re: Force All Fields To Be Required On Upload Form?
 
I just looked at the page source code and noticed that the additional custom fields are displayed a "field2", "field3":

Here is the code:

Code:

Content visible to verified customers only.
Is that way adding the "imageinfo[make] , imageinfo[model]" in the code isnt working ?

kderentz April 22nd, 2005 01:59 PM

Re: Force All Fields To Be Required On Upload Form?
 
Quote:

Originally Posted by Brian
There was no reason to change 'title' and 'description'. Change those back to the exact code I posted and it should work fine.

But I dont want the description field to be required.

I just want the following required:

Title
Keywords
Make
Model

By the way thanks for all this help and the patiance with me! :D

kderentz April 22nd, 2005 03:53 PM

Re: Force All Fields To Be Required On Upload Form?
 
I got it working for the title and keywords ... but how do I make custom the custom fields required?

Under custom fields I selected that they are required but it still allows you to upload a imge without filling them out.

cbr929rrerion October 26th, 2005 06:36 AM

Re: Force All Fields To Be Required On Upload Form?
 
I looked for that code in mine and could not find it.. am I looking in the wrong place?


All times are GMT -5. The time now is 08:12 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97