Hi, how can i add some text in the contact page before the form.
Thanks
@silvanadiaz - you have 2 options
1 - please go to contact page from backend pages and add text in the page or
2 - directly add text to contact template
if possible to share code so i will add code
This is the code
{{block.settings.column-text-subheading}}
{% schema %}
{
“name”: “column Text”,
“settings”: [
{
“id”: “heading”,
“type”: “text”,
“label”: “Heading”
}
]
,
“presets”: [
{
“name”: “column Text”
}
] ,
“blocks”: [
{
“type”: “text”,
“name”: “column Text”,
“settings”: [
{
“id”: “column-text-heading”,
“type”: “text”,
“label”: “column Heading”
},
{
“id”: “column-text-subheading”,
“type”: “text”,
“label”: “column Sub Heading”
}
]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
Hi, this is the code, i want to add some text before de form
{{block.settings.column-text-subheading}}
{% schema %}
{
“name”: “column Text”,
“settings”: [
{
“id”: “heading”,
“type”: “text”,
“label”: “Heading”
}
]
,
“presets”: [
{
“name”: “column Text”
}
] ,
“blocks”: [
{
“type”: “text”,
“name”: “column Text”,
“settings”: [
{
“id”: “column-text-heading”,
“type”: “text”,
“label”: “column Heading”
},
{
“id”: “column-text-subheading”,
“type”: “text”,
“label”: “column Sub Heading”
}
]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
thanks for code but sorry it’s not contact page code
Sorry, this one is
{%- form ‘contact’, class: ‘Form Form–spacingTight’ -%}
{%- if form.posted_successfully? -%}
{{ 'contact.form.successfully_sent' | t }}
{%- endif -%}{%- if form.errors -%}
{%- for block in section.blocks -%}
{%- assign field_title = block.settings.title -%}
{%- if field_title == blank -%}
{%- capture field_title -%}Custom field {% increment custom_field %}{%- endcapture -%}
{%- endif -%}
{%- if block.type == ‘text’ -%}
{%- if values == empty -%}
{%- continue -%}
{%- endif -%}
{{ ‘contact.form.submit’ | t }}
{%- endform -%}
{% schema %}
{
“name”: “Contact page”,
“settings”: ,
“blocks”: [
{
“type”: “text”,
“name”: “Text field”,
“settings”: [
{
“type”: “text”,
“id”: “title”,
“label”: “Name”,
“default”: “Custom field”
},
{
“type”: “checkbox”,
“id”: “use_long_text”,
“label”: “Use long text”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “is_required”,
“label”: “Field is required”,
“default”: false
}
]
},
{
“type”: “dropdown”,
“name”: “Dropdown”,
“settings”: [
{
“type”: “text”,
“id”: “title”,
“label”: “Name”,
“default”: “Custom field”
},
{
“type”: “text”,
“id”: “values”,
“label”: “Values”,
“info”: “Separate each value by a comma.”,
“default”: “value 1, value 2, value 3”
}
]
}
],
“default”: {
“blocks”: [
{
“type”: “text”,
“settings”: {
“title”: “Your phone (optional)”
}
}
]
}
}
{% endschema %}
no rush thanks for code
please add code here
{{- page.content -}}
{%- form 'contact', class: 'Form Form--spacingTight' -%}
{%- if form.posted_successfully? -%}
{{ 'contact.form.successfully_sent' | t }}
{%- endif -%}
{%- if form.errors -%}
{%- for field in form.errors -%}
{%- if field == 'form' -%}
- {{ form.errors.messages[field] }}
{%- else -%}
- **{{ form.errors.translated_fields[field] }}** {{ form.errors.messages[field] }}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- for block in section.blocks -%}
{%- assign field_title = block.settings.title -%}
{%- if field_title == blank -%}
{%- capture field_title -%}Custom field {% increment custom_field %}{%- endcapture -%}
{%- endif -%}
{%- if block.type == 'text' -%}
{%- if block.settings.use_long_text -%}
{%- else -%}
{%- endif -%}
{%- elsif block.type == 'dropdown' -%}
{%- assign values = block.settings.values | split: ',' -%}
{%- if values == empty -%}
{%- continue -%}
{%- endif -%}
{%- render 'icon' with 'select-arrow' -%}
{%- endif -%}
{%- endfor -%}
{%- endform -%}
{% schema %}
{
"name": "Contact page",
"settings": [],
"blocks": [
{
"type": "text",
"name": "Text field",
"settings": [
{
"type": "text",
"id": "title",
"label": "Name",
"default": "Custom field"
},
{
"type": "checkbox",
"id": "use_long_text",
"label": "Use long text",
"default": false
},
{
"type": "checkbox",
"id": "is_required",
"label": "Field is required",
"default": false
}
]
},
{
"type": "dropdown",
"name": "Dropdown",
"settings": [
{
"type": "text",
"id": "title",
"label": "Name",
"default": "Custom field"
},
{
"type": "text",
"id": "values",
"label": "Values",
"info": "Separate each value by a comma.",
"default": "value 1, value 2, value 3"
}
]
}
],
"default": {
"blocks": [
{
"type": "text",
"settings": {
"title": "Your phone (optional)"
}
}
]
}
}
{% endschema %}
@KetanKumar I tried adding that code to my Contact back page, but I received an error message. I would like for the text to be above the fields because my text is white and background is black, but I can change this page because other pages will be messed up. I tried adding it under page.contact.liquid. Can you assist?
Thanks!
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Here is my link: https://creations-at-will.myshopify.com/
Can you also tell me why some of my products have the PayPal button on the same page as Add to Cart and some do not?
Thanks!
sorry your store password protect
Hello,
This inquiry doesn’t belong to me, please verify the email account.
Thanks