cancel
Showing results for 
Search instead for 
Did you mean: 

Contact Us Form

SOLVED

Contact Us Form

Magento 2, Ultimo Theme.

 

Trying to get the settings right for the contact form, it just isn't showing up.

I created a static block and inserted it into the contact page. But the block itself isn't showing. 

All "help" information via google search is useless. Every single one doesn't even mention creating the static block. And it is like they are all just copied and re-posted. 

Can anyone point me to a good help site or something that will get me to troubleshoot this properly? 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Contact Us Form

Hi @allen_groff,

Please have a look into following document of ultimo theme. 

https://s3.eu-central-1.amazonaws.com/elabos-files/PDF/Ultimo%202%20User%20Guide.pdf

4.8.2 Static blocks

How to call a static block?
you can follow following link:
https://meetanshi.com/blog/call-cms-static-block-in-phtml-file-in-magento-2/

Contact Us Form
If contact us form is called from a phtml file then you can call static block in the phtml file using above link.  

To get the phtml file path of contact us form you can follow below link:
https://www.mageplaza.com/kb/how-to-enable-template-path-hints-magento-2.html

I hope it will help you!

View solution in original post

6 REPLIES 6

Re: Contact Us Form

Hi @allen_groff,

Please have a look into following document of ultimo theme. 

https://s3.eu-central-1.amazonaws.com/elabos-files/PDF/Ultimo%202%20User%20Guide.pdf

4.8.2 Static blocks

How to call a static block?
you can follow following link:
https://meetanshi.com/blog/call-cms-static-block-in-phtml-file-in-magento-2/

Contact Us Form
If contact us form is called from a phtml file then you can call static block in the phtml file using above link.  

To get the phtml file path of contact us form you can follow below link:
https://www.mageplaza.com/kb/how-to-enable-template-path-hints-magento-2.html

I hope it will help you!

Re: Contact Us Form

Thank You, I will give it a look. I appreciate you taking the time to find that documentation, thanks again! 

Re: Contact Us Form

@allen_groff 
My pleasure!

Please confirm after look into it, if it will work for you!

Re: Contact Us Form

I can't seem to find the default Contact Us block. So if I create a block, I don't have the code to apply the contact us form. 

Re: Contact Us Form

Ok, so I was able to get the contact form in place on the contact page. 

But I still have the problem of not seeing the block on my list. 

I entered this code on the contact page: 

{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}

 

ContactForm block isn't visible though. So I can't edit it to add/delete form input fields. 

2019-05-30 14_19_49-Window.png

Re: Contact Us Form

HI @allen_groff 

I am unable to see your screenshot. Could you please share again?

In you need to edit form fields then you need to edit form.phtml itself. 
You can c

<?php
echo $this->getLayout()
->createBlock('Magento\Cms\Block\Block')
->setBlockId('your_block_identifier')
->toHtml();
?>

all your static block in this file by using following way:

Then you can access default magento contact form using below url:
http://YOUR_WEBSITE_URL/contact (eg: https://demo1-m2.mage.direct/contact/)

But make sure if you edit form.phml in vendor folder then you need to copy that file in your current theme and then edit if not exist, otherwise it will be replaced again when you upgrade magento.

you can also see your current active phtml file path using admin functionality "Enable template path" hint on frontend YES. 
To get the phtml file path on frontend of contact us form you can follow below link:
https://www.mageplaza.com/kb/how-to-enable-template-path-hints-magento-2.html
You can check form path on contact page:
http://YOUR_WEBSITE_URL/contact (eg: https://demo1-m2.mage.direct/contact/)

I hope it will help you!