Shopify themes, liquid, logos, and UX
Hello!
I have a question concerning the forms in Shopify.
I managed to add fields to the custom forms from the Dawn theme.
The only thing left is that I want the Email field to take the full length of the form like to Object field.
I don't know what to add to my code.
I can't give a link since it's a draft to replace the current website but here is the code in my contact-form.liquid for the email and object field:
<div class="field field--with-error">
<input
autocomplete="email"
type="email"
id="ContactForm-email"
class="field__input"
name="contact[email]"
spellcheck="false"
autocapitalize="off"
value="{% if form.email %}{{ form.email }}{% elsif customer %}{{ customer.email }}{% endif %}"
aria-required="true"
{% if form.errors contains 'email' %}
aria-invalid="true"
aria-describedby="ContactForm-email-error"
{% endif %}
placeholder="{{ 'templates.contact.form.email' | t }}"
>
<label class="field__label" for="ContactForm-email">
{{- 'templates.contact.form.email' | t }}
<span aria-hidden="true">*</span></label
>
{%- if form.errors contains 'email' -%}
<small class="contact__field-error" id="ContactForm-email-error">
<span class="visually-hidden">{{ 'accessibility.error' | t }}</span>
<span class="form__message">
{%- render 'icon-error' -%}
{{- form.errors.translated_fields.email | capitalize }}
{{ form.errors.messages.email -}}
</span>
</small>
{%- endif -%}
</div>
</div>
<div class="field">
<input
class="field__input"
autocomplete="object"
type="text"
id="ContactForm-object"
name="contact[{{ 'templates.contact.form.object' | t }}]"
value="{% if form.name %}{{ form.name }}{% elsif customer %}{{ customer.object }}{% endif %}"
placeholder="{{ 'templates.contact.form.object' | t }}"
>
<label class="field__label" for="ContactForm-object">{{ 'templates.contact.form.object' | t }}</label>
</div>
Thank you!
Hey @Prolifink,
Can you share your Store URL so I can have a look at it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.
Best Regards,
Helal
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024