By scarer on
Hi,
I was wondering if anyone could tell me where the form is for uploading an image as I want to make the category drop-down (to select the appropriate Image gallery) a compulsory field.
Any help would be greatly appreciated.
Thank you very much.
Sarah
Comments
=-=
There isn't one. you would have to alter the image.module file or override the form at theme level.
what do you mean by alter?
what do you mean by alter? the image.module file is in php. it doesn't contain any form fields. is there a way to specify it in the php?
=-=
: ) it does contain form fields, just not HTML form fields.
example pulled directly from the image.module file:
you will need to read the handbooks about how to customize drupal forms to learn how to alter them.
form generation = http://api.drupal.org/api/5/group/form
hook form = http://api.drupal.org/api/5/function/hook_form
No need to modify the form
Instead you can make the vocabulary (taxonomy/category) required.
Goto to 'Administer'
Under 'Content management' select 'Categories'
Find the category that applies to images (image will be in type column) that you want required, click on 'edit vocabulary'
Find the 'Required' checkbox (toward the end of the form) and check it.
=-=
ahh yes! follow nevets advice if all you want to do is force a category, I thought the first part of your question was about to to alter the forms themselves AND and force a category.
excellent
thanks for all your help. did the trick nicely :)