FROM CACHE - fr_header

Add description under "CONTACT US" title

Add description under "CONTACT US" title

Arthur18
Visiteur
2 0 0

Hello,

I'm trying to add a description under the "CONTACT US" title.

Capture d’écran 2022-07-21 à 22.55.58.png

<div class="index-section">
<div class="page-width">

<div class="grid" data-aos>
<div class="grid__item{% if section.settings.narrow_column %} medium-up--three-quarters medium-up--push-one-eighth{% endif %}">
{%- if section.settings.title != blank -%}
<header class="section-header">
<h2 class="section-header__title appear-delay">
{{ section.settings.title }}
</h2>
</header>
{%- endif -%}

<div class="form-vertical appear-delay-1">
{%- assign form_id = 'contact-' | append: section.id -%}
{%- form 'contact', id: form_id -%}

{%- if form.posted_successfully? -%}
<p class="note note--success">
{{ 'contact.form.post_success' | t }}
</p>
{%- endif -%}

{{ form.errors | default_errors }}

<div class="grid grid--small">
<div class="grid__item medium-up--one-half">
<label for="ContactFormName-{{ section.id }}">{{ 'contact.form.name' | t }}</label>
<input type="text" id="ContactFormName-{{ section.id }}" class="input-full" name="contact[name]" autocapitalize="words" value="{% if form.name %}{{ form.name }}{% elsif customer %}{{ customer.name }}{% endif %}">
</div>

<div class="grid__item medium-up--one-half">
<label for="ContactFormEmail-{{ section.id }}">{{ 'contact.form.email' | t }}</label>
<input type="email" id="ContactFormEmail-{{ section.id }}" class="input-full" name="contact[email]" autocapitalize="off" value="{% if form.email %}{{ form.email }}{% elsif customer %}{{ customer.email }}{% endif %}">
</div>
</div>

{%- if section.settings.show_phone -%}
<label for="ContactFormPhone-{{ section.id }}">{{ 'contact.form.phone' | t }}</label>
<input type="tel" id="ContactFormPhone-{{ section.id }}" class="input-full" name="contact[phone]" pattern="[0-9\-]*" value="{% if form.phone %}{{ form.phone }}{% elsif customer %}{{ customer.phone }}{% endif %}">
{%- endif -%}

<label for="ContactFormMessage-{{ section.id }}">{{ 'contact.form.message' | t }}</label>
<textarea rows="5" id="ContactFormMessage-{{ section.id }}" class="input-full" name="contact[body]">{% if form.body %}{{ form.body }}{% endif %}</textarea>

<button type="submit" class="btn">
{{ 'contact.form.send' | t }}
</button>

{% comment %}
Remove the following three lines of code to remove the note
about being protected by Google's reCAPTCHA service.
By removing it, the small reCAPTCHA widget will appear in the
bottom right corner of the page.
{% endcomment %}
{{ 'shopify.online_store.spam_detection.disclaimer_html' | t }}

{%- endform -%}
</div>
</div>
</div>
</div>
</div>

{% schema %}
{
"name": "Contact form",
"settings": [
{
"type": "paragraph",
"content": "All submissions are sent to the customer email address of your store. [Learn more](https://help.shopify.com/en/manual/using-themes/change-the-layout/add-contact-form#view-contact-form...)."
},
{
"type": "text",
"id": "title",
"label": "Title",
"default": "Contact us"
},
{
"type": "checkbox",
"id": "show_phone",
"label": "Show phone number"
},
{
"type": "checkbox",
"id": "narrow_column",
"label": "Narrow column",
"default": true
}
],
"presets": [{
"name": "Contact form",
"category": "Store information"
}]
}
{% endschema %}

 

That’s the code that I have

 

If someone can find a solution

Thank you

 

3 RÉPONSES 3

Agence_Deployer
Shopify Partner
62 11 14

Hey!

Between the closing </h2> tag and closing </header> tag you can add your text :

{%- if section.settings.title != blank -%}
<header class="section-header">
<h2 class="section-header__title appear-delay">
{{ section.settings.title }}
</h2>
<p>Hello this is my short description under title !</p> 
</header>
{%- endif -%}

Notre réponse vous a été utile ? Cliquez sur "J'aime" ou sur "Accepter comme solution".
Si vous souhaitez prendre contact avec des experts pour modifier ou optimiser votre boutique en ligne, rendez-vous par message privé ou sur contact@the-deployer.fr.
Arthur18
Visiteur
2 0 0

Hey, thanks for your response but it seems that it hasn't worked

 

Agence_Deployer
Shopify Partner
62 11 14

Yesss probably because your title is blank :

{%- if section.settings.title != blank -%}

Notre réponse vous a été utile ? Cliquez sur "J'aime" ou sur "Accepter comme solution".
Si vous souhaitez prendre contact avec des experts pour modifier ou optimiser votre boutique en ligne, rendez-vous par message privé ou sur contact@the-deployer.fr.