I'm trying to create a form with Freeform Pro containing a File Upload field that is required. So the form should only submit when the user actually uploads a file.
Setting the field to required in template parameter seems to have no effect.
Bug or missing feature? Any workarounds?
{exp:freeform:form form_name="feedback" secure_action="yes" secure_return="yes" required="some_picture|email" form:id="some_form" admin_notification_template="feedback_notify" admin_notify="foobar@example.com" prevent_duplicate_on="email" inline_error_return="group/template" inline_errors="yes" return="group/feedback_thanx"}
<label for="fmail">
<span class="frage"{if freeform:error:email} style="color:red;"{/if}> E-MAIL </span>
{freeform:field:email id="fmail"}
</label>
<label for="some_picture">
<span class="frage" {if freeform:error:some_picture}style="color:red;"{/if}>Please upload! </span><br><br>
{freeform:field:some_picture id="some_picture"}
</label>
<input type="submit" name="submit" value="Absenden" />
{/exp:freeform:form}
{exp:freeform:composer}
) or regular Freeform template code (i.e.{exp:freeform:form}
)? Can you show us your code? Also, what version of Freeform are you using?some_picture
a field created in Freeform's module in the CP? Is it spelled correctly? Is the field assigned to yourfeedback
form? Have you tried the above code COMPLETELY alone on a blank template? Please try that in case other tags are affecting your form. Tested with a required file upload field and it worked.attr:id="some_picture"
, notid="some_picture"
.