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

#   custom fields that only show on variants

##

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

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 10 months ago -  12 years 10 months ago [\#139254](#139254) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  *[custom fields that only show on variants](/forum/31-development/864900-custom-fields-that-only-show-on-variants#139254 "-- HikaShop version -- : 2.2.3 -- Joomla version -- :3.2.1  I have kind of a weird request and i cannot find a solutions to this. I have a mattress site i am making and I am almost done with it so this is urgent. I have characteristics that describe the mattress. I then have product variants of that mattress: twin, twin xl, queen etc.  I basically have 3 custom fields that I only want to show up under the variants not the main product.  Also, under the variants how can I hide all the custom fields on the main product they automatically show up on the variants and they do not need to be there.  Also if you can think of a solution to where I can make a custom field show based off of the product characteristic dropdown selection. This is what I have been trying to figure out because it seems like the easier way to go about this? I already have the 3 fields i need for each characteristic in my main product. I know this requires some javascript, but I do not quite know how to write it or where to place it at?How would I go about doing this way? Thanks,  Josh")* was created by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")*

-- HikaShop version -- : 2.2.3
-- Joomla version -- ![:3](/smile3.gif ":3").2.1

I have kind of a weird request and i cannot find a solutions to this. I have a mattress site i am making and I am almost done with it so this is urgent. I have characteristics that describe the mattress. I then have product variants of that mattress: twin, twin xl, queen etc.

I basically have 3 custom fields that I only want to show up under the variants not the main product.

Also, under the variants how can I hide all the custom fields on the main product they automatically show up on the variants and they do not need to be there.

Also if you can think of a solution to where I can make a custom field show based off of the product characteristic dropdown selection. This is what I have been trying to figure out because it seems like the easier way to go about this? I already have the 3 fields i need for each characteristic in my main product. I know this requires some javascript, but I do not quite know how to write it or where to place it at?How would I go about doing this way?
Thanks,

Josh

Last edit: 12 years 10 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NDkwMC1jdXN0b20tZmllbGRzLXRoYXQtb25seS1zaG93LW9uLXZhcmlhbnRzP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

12 years 10 months ago [\#139358](#139358) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom fields that only show on variants](/forum/31-development/864900-custom-fields-that-only-show-on-variants#139358 "-- HikaShop version -- : 2.2.3 -- Joomla version -- :3.2.1  I have kind of a weird request and i cannot find a solutions to this. I have a mattress site i am making and I am almost done with it so this is urgent. I have characteristics that describe the mattress. I then have product variants of that mattress: twin, twin xl, queen etc.  I basically have 3 custom fields that I only want to show up under the variants not the main product.  Also, under the variants how can I hide all the custom fields on the main product they automatically show up on the variants and they do not need to be there.  Also if you can think of a solution to where I can make a custom field show based off of the product characteristic dropdown selection. This is what I have been trying to figure out because it seems like the easier way to go about this? I already have the 3 fields i need for each characteristic in my main product. I know this requires some javascript, but I do not quite know how to write it or where to place it at?How would I go about doing this way? Thanks,  Josh")*

Hi,

Restricting the custom fields display based on the characteristics selection will indeed require you to add custom javascript.
The exact code will depend on how is done your website.
Here is an example:
[ api.jquery.com/change/](http://api.jquery.com/change/)
so the code would be something like that: Code:

$('#characteristic_dropdown_id').change(){ if($('#characteristic_dropdown_id').val()=='my_characteristic_value'){ $('#custom_field_row_id').css('display',''); }else{ $('#custom_field_row_id').css('display','block'); } }

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

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