Reputation: 524
I have this liquid on a page template:
{% form 'contact' %}
{% if form.posted_successfully? %}
<p class="note success">Success!</p>
{% endif %}
{{ form.errors | default_errors }}
<p>
<label for="ContactFormName">Name</label>
<input type="text" id="ContactFormName" name="contact[name]" value="{% if form[name_attr] %}{{ form[name_attr] }}{% elsif customer %}{{ customer.name }}{% endif %}" required>
</p>
<p>
<label for="ContactFormCV">Upload CV</label>
<input type="file" id="ContactFormCV" name="contact[cv]" required />
</p>
{% endform %}
The problem is that when a file is selected for upload and the form submitted, the email that is received only shows the file name. Ideally it should have the file attached, or a link to the file.
If I change the form tag to this...
{% form 'contact', enctype: 'multipart/form-data' %}
...I get this error when submitting a form:
There was a problem loading this website
Try refreshing the page.
If the site still doesn't load, please try again in a few minutes.
How can I get this to work?
Note: This form is being used on a custom template in the templates directory (page.employment.liquid).
Upvotes: 0
Views: 2215
Reputation: 2173
As far as I know, Shopify liquid forms do not accept file input type.
You have basically two solutions:
HTH
Upvotes: 1