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

#   Display product custom fields in product contact form

##

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

Less More

- Posts: 26
- Thank you received: 3
-
-

5 years 10 months ago [\#327826](#327826) by [multigeo](/forum/user/41399-multigeo "View multigeo's Profile")  *[Display product custom fields in product contact form](/forum/26-product-category-display/901580-display-product-custom-fields-in-product-contact-form#327826 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3.7 -- Browser(s) name and version -- : not relevant -- Error-message(debug-mod must be tuned on) -- : none  Hi Guys, I would like to display the contents of the product custom fields on the contact form of the product. I checked the docs and forum, but did not find what I'm looking for, so I hope you can help.  The URL I entered above shows what the product page looks like - it's currently in &quot;catalog mode&quot;.  We would like to allow a visitor to enter available info about the picture and stimulate this by showing all we already know (which is mainly in custom fields). I have tried creating custom contact fields, which works, but I would then need to transfer the values of the product custom fields to the form, but I cannot find the proper way to access the custom fields of the product. Getting values into the form is not the problem, getting the right values there, that's my problem.  Again, I hope you can give me a little push in the proper direction.  Cheers, André")* was created by *[multigeo](/forum/user/41399-multigeo "View multigeo's Profile")*

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3.7
-- Browser(s) name and version -- : not relevant
-- Error-message(debug-mod must be tuned on) -- : none

Hi Guys,
I would like to display the contents of the product custom fields on the contact form of the product.
I checked the docs and forum, but did not find what I'm looking for, so I hope you can help.

The URL I entered above shows what the product page looks like - it's currently in "catalog mode".

We would like to allow a visitor to enter available info about the picture and stimulate this by showing all we already know (which is mainly in custom fields).
I have tried creating custom contact fields, which works, but I would then need to transfer the values of the product custom fields to the form, but I cannot find the proper way to access the custom fields of the product.
Getting values into the form is not the problem, getting the right values there, that's my problem.

Again, I hope you can give me a little push in the proper direction.

Cheers,
André

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE1ODAtZGlzcGxheS1wcm9kdWN0LWN1c3RvbS1maWVsZHMtaW4tcHJvZHVjdC1jb250YWN0LWZvcm0/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: 86584
- Thank you received: 14325
-
-

5 years 10 months ago [\#327828](#327828) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display product custom fields in product contact form](/forum/26-product-category-display/901580-display-product-custom-fields-in-product-contact-form#327828 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3.7 -- Browser(s) name and version -- : not relevant -- Error-message(debug-mod must be tuned on) -- : none  Hi Guys, I would like to display the contents of the product custom fields on the contact form of the product. I checked the docs and forum, but did not find what I'm looking for, so I hope you can help.  The URL I entered above shows what the product page looks like - it's currently in &quot;catalog mode&quot;.  We would like to allow a visitor to enter available info about the picture and stimulate this by showing all we already know (which is mainly in custom fields). I have tried creating custom contact fields, which works, but I would then need to transfer the values of the product custom fields to the form, but I cannot find the proper way to access the custom fields of the product. Getting values into the form is not the problem, getting the right values there, that's my problem.  Again, I hope you can give me a little push in the proper direction.  Cheers, André")*

Hi,

Supposing that your custom contact fields are named xxx and yyy and that the corresponding custom product fields are named xxx_product and yyy_product, then, you should be able to do that by changing the code:
$itemData = @$formData-&gt;$fieldName;
to:
$column_name = $fieldName.'_product';
$itemData = @$this-&gt;product-&gt;$column_name;
in the file "contact" of the view "product" via the menu Display&gt;Views.

The following user(s) said Thank You: [multigeo](/forum/user/41399-multigeo "View multigeo's Profile")

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

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

Less More

- Posts: 26
- Thank you received: 3
-
-

5 years 10 months ago [\#327839](#327839) by [multigeo](/forum/user/41399-multigeo "View multigeo's Profile")  Replied by *[multigeo](/forum/user/41399-multigeo "View multigeo's Profile")* on topic *[Display product custom fields in product contact form](/forum/26-product-category-display/901580-display-product-custom-fields-in-product-contact-form#327839 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3.7 -- Browser(s) name and version -- : not relevant -- Error-message(debug-mod must be tuned on) -- : none  Hi Guys, I would like to display the contents of the product custom fields on the contact form of the product. I checked the docs and forum, but did not find what I'm looking for, so I hope you can help.  The URL I entered above shows what the product page looks like - it's currently in &quot;catalog mode&quot;.  We would like to allow a visitor to enter available info about the picture and stimulate this by showing all we already know (which is mainly in custom fields). I have tried creating custom contact fields, which works, but I would then need to transfer the values of the product custom fields to the form, but I cannot find the proper way to access the custom fields of the product. Getting values into the form is not the problem, getting the right values there, that's my problem.  Again, I hope you can give me a little push in the proper direction.  Cheers, André")*

Great! Thanks Nicholas.
That was just what I needed, problem solved!
Only some CSS tweaking left and I'm done ![:-)](/media/kunena/emoticons/3.png ":-)")

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE1ODAtZGlzcGxheS1wcm9kdWN0LWN1c3RvbS1maWVsZHMtaW4tcHJvZHVjdC1jb250YWN0LWZvcm0/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)
