All things Shopify and commerce
Hey Guys,
I added in some code to put into an additional Subject Line text field in my contact form - but it's coming up as Translation Missing as shown in the image.
I've gone into the "edit default theme content" section to try and find the missing translation or add a new translation link in but I couldn't find anything / know how to do this.
Could someone help me out?
Solved! Go to the solution
This is an accepted solution.
Add the translation in locales/en.default.json. Use Ctrl+F or Cmd+F on macOS, type in "form": { (including the quotes) and hit enter. That's where you need to add the "subject" key-value pair.
This is an accepted solution.
Add the translation in locales/en.default.json. Use Ctrl+F or Cmd+F on macOS, type in "form": { (including the quotes) and hit enter. That's where you need to add the "subject" key-value pair.
Legend it works thanks Fadi
One additional question I did a test contact form run and I get this label (New customer message on %{creation_date}:) for where the subject line should be:
Any idea where the code is to change that?
Change everything except one to "Subject-2" instead of "Subject". Otherwise it uses the Subject line for the email you receive from the form.
In locales/en.default.json:
"contact": {
"form": {
"name": "Name",
"email": "Email",
"phone": "Phone Number",
"subject-2": "Subject",
"message": "Message",
"send": "Send",
"post_success": "Thanks for contacting us. We'll get back to you as soon as possible."
}
In page.contact.liquid:
{% include 'breadcrumb' %}
<div class="grid">
<div class="grid-item large--two-thirds push--large--one-sixth">
<h2>{{ page.title }}</h2>
<div class="rte">
{{ page.content }}
</div>
<div>
{% form 'contact' %}
{% if form.posted_successfully? %}
<p class="note form-success">
{{ 'contact.form.post_success' | t }}
</p>
{% endif %}
{% include 'form-errors-custom' %}
<div id="contactFormWrapper">
<label for="contactFormName" class="hidden-label">{{ 'contact.form.name' | t }}</label>
<input type="text" id="contactFormName" name="contact[name]" placeholder="{{ 'contact.form.name' | t }}" value="{% if form.name %}{{ form.name }}{% elsif customer %}{{ customer.name }}{% endif %}">
<label for="contactFormEmail" class="hidden-label">{{ 'contact.form.email' | t }}</label>
<input type="email" id="contactFormEmail" name="contact[email]" placeholder="{{ 'contact.form.email' | t }}" autocorrect="off" autocapitalize="off" value="{% if form.email %}{{ form.email }}{% elsif customer %}{{ customer.email }}{% endif %}">
<label for="contactFormPhone" class="hidden-label">{{ 'contact.form.phone' | t }}</label>
<input type="tel" id="contactFormPhone" name="contact[phone]" placeholder="{{ 'contact.form.phone' | t }}" value="{% if form.phone %}{{ form.phone }}{% elsif customer %}{{ customer.phone }}{% endif %}">
<label for="contactFormSubject-2" class="hidden-label">{{ 'contact.form.subject-2' | t }}</label>
<input type="text" id="contactFormSubject-2" name="contact[subject-2]" placeholder="{{ 'contact.form.subject-2' | t }}" value="{% if form.subject-2 %}{{ form.subject-2 }}{% elsif customer %}{{ customer.subject-2 }}{% endif %}">
<label for="contactFormMessage" class="hidden-label">{{ 'contact.form.message' | t }}</label>
<textarea rows="10" id="contactFormMessage" name="contact[body]" placeholder="{{ 'contact.form.message' | t }}">{% if form.body %}{{ form.body }}{% endif %}</textarea>
<input type="submit" class="btn right" value="{{ 'contact.form.send' | t }}">
</div>
{% endform %}
</div>
</div>
</div>
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025