Hi all my background isn’t coding so I need some help here. Below is a form for users to create a weblog photo gallery. I want to require them to upload a cover image before they click submit. I tried various things and search the web for help but couldn’t find anything that worked. {cover_img} is a custom weblog field and the field type is “nGen File Field” . That is what I want to be required. When editing the cover_img custom field there is an option “Is this a required field?” which I clicked yes on but nothing changed.
Can somebody help me?
{exp:weblog:entry_form weblog="galleries" show_fields="not ps_photos|cover_img|gallery_photo_unlimited|gallery_photo_standard|gallery_photo_free|gallery_photo_guild" status="open"}
<input type="hidden" name="entry_id_return" value="/galleries/entry/%%entry_id%%" />
<input type="hidden" name="status" value="open" />
<div class="ff-ft">
<h4>Your Gallery Title</h4>
<p><input type="text" name="title" id="title" value="{title}" maxlength="100" class="input" /></p><br />
</div></p>
<p> </p>
<p><div class="ff-ft"></p><h4>Upload Your Cover Image</h4>
<p>{cover_txt}<br />
{cover_img}<br />
</div></p>
<p> </p>
<p><div class="ff-ft"></p><h4>Add Your Photos</h4>
<p>Photo Size: <strong>640 x 427</strong>. Add your gallery here. <br />
With your Free membership, you can upload 10 images. To arrange PHOTO ORDER, click and drag the corresponding number.<br />
{gallery_photo_free}<br />
</div></p>
<p> </p>
<p>{custom_fields}<br />
<div class="ff-ft"><br />
{if required}* {/if}</p><h4>{field_label}</h4>
<p>{field_instructions}<br />
{if textarea}<br />
<textarea id="{field_name}" name="{field_name}" class="input" dir="{text_direction}">{field_data}</textarea></div> <br />
{/if}</p>
<p>{if textinput}<br />
<input type="text" dir="{text_direction}" id="{field_name}" class="input" name="{field_name}" value="{field_data}" maxlength="{maxlength}" /></div> <br />
{/if}</p>
<p>{if pulldown}<br />
<select id="{field_name}" name="{field_name}"><br />
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}</p>
<p></select></div> <br />
{/if}</p>
<p>{if date}<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" class="input"/></div> <br />
{/if}<br />
{/custom_fields} </p>
<p><input type="image" src="/assets/submit-btn.gif" name="submit" value="Submit" class="ro"/></p><br />
{/exp:weblog:entry_form}