[Skip to main content](#vessel-content)

#   Contact form in product page - checkFields is not defined

##

- **[thdev](/forum/user/46644-thdev "View thdev's Profile")**
- [![thdev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46644-thdev "View thdev's Profile") Topic Author
- [ Offline](/forum/user/46644-thdev)

Less More

- Posts: 5
- Thank you received: 0
-
-

9 years 10 months ago [\#258532](#258532) by [thdev](/forum/user/46644-thdev "View thdev's Profile")  *[Contact form in product page - checkFields is not defined](/forum/32-content-creation/888101-contact-form-in-product-page-checkfields-is-not-defined#258532 "Hi, I try to include a contact form (quote) inside my product page because I don't want a step with a button but directly my form on the product page.  I proceed, in my template override like this to include contact.php overrided to:  But I got that error  The function contact() from ProductViewProduct doesn't seems to be loaded and I can't load it with $this-&gt;contact() (all $this data are erased).  Can you help me integrate the contact form inside my product page please. Thank You.")* was created by *[thdev](/forum/user/46644-thdev "View thdev's Profile")*

Hi,
I try to include a contact form (quote) inside my product page because I don't want a step with a button but directly my form on the product page.

I proceed, in my template override like this to include contact.php overrided to: Code:

$this-&gt;setLayout('contact'); echo $this-&gt;loadTemplate();

But I got that error

> Uncaught ReferenceError: checkFields is not defined
> at HTMLButtonElement.onclick (circuit-voyage-test:734)

The function contact() from ProductViewProduct doesn't seems to be loaded and I can't load it with $this-&gt;contact() (all $this data are erased).

Can you help me integrate the contact form inside my product page please. Thank You.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODg4MTAxLWNvbnRhY3QtZm9ybS1pbi1wcm9kdWN0LXBhZ2UtY2hlY2tmaWVsZHMtaXMtbm90LWRlZmluZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

9 years 10 months ago [\#258534](#258534) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Contact form in product page - checkFields is not defined](/forum/32-content-creation/888101-contact-form-in-product-page-checkfields-is-not-defined#258534 "Hi, I try to include a contact form (quote) inside my product page because I don't want a step with a button but directly my form on the product page.  I proceed, in my template override like this to include contact.php overrided to:  But I got that error  The function contact() from ProductViewProduct doesn't seems to be loaded and I can't load it with $this-&gt;contact() (all $this data are erased).  Can you help me integrate the contact form inside my product page please. Thank You.")*

Hi,

Instead of doing Code:

$this-&gt;setLayout('contact'); echo $this-&gt;loadTemplate();

which requires $this-&gt;contact() to be called before, you should rather use: Code:

js = ''; echo hikashop_getLayout('product', 'contact', $this-&gt;params, $js);

Note however that you can't have a form instead a form in HTML, that's not valid and it won't work.
So make sure that you load the contact form outside of the product page form.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODg4MTAxLWNvbnRhY3QtZm9ybS1pbi1wcm9kdWN0LXBhZ2UtY2hlY2tmaWVsZHMtaXMtbm90LWRlZmluZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[thdev](/forum/user/46644-thdev "View thdev's Profile")**
- [![thdev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46644-thdev "View thdev's Profile") Topic Author
- [ Offline](/forum/user/46644-thdev)

Less More

- Posts: 5
- Thank you received: 0
-
-

9 years 10 months ago [\#258733](#258733) by [thdev](/forum/user/46644-thdev "View thdev's Profile")  Replied by *[thdev](/forum/user/46644-thdev "View thdev's Profile")* on topic *[Contact form in product page - checkFields is not defined](/forum/32-content-creation/888101-contact-form-in-product-page-checkfields-is-not-defined#258733 "Hi, I try to include a contact form (quote) inside my product page because I don't want a step with a button but directly my form on the product page.  I proceed, in my template override like this to include contact.php overrided to:  But I got that error  The function contact() from ProductViewProduct doesn't seems to be loaded and I can't load it with $this-&gt;contact() (all $this data are erased).  Can you help me integrate the contact form inside my product page please. Thank You.")*

Thank you,
Indeed the both solutions are working outside the product page form.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODg4MTAxLWNvbnRhY3QtZm9ybS1pbi1wcm9kdWN0LXBhZ2UtY2hlY2tmaWVsZHMtaXMtbm90LWRlZmluZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.041 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
