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

#   Display Custom Field after Characteristics chosen

##

- **[markfell](/forum/user/27962-markfell "View markfell's Profile")**
- [![markfell's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27962.png)](/forum/user/27962-markfell "View markfell's Profile") Topic Author
- [ Offline](/forum/user/27962-markfell)

Less More

- Posts: 135
- Thank you received: 5
-
-

4 years 5 months ago [\#341698](#341698) by [markfell](/forum/user/27962-markfell "View markfell's Profile")  *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341698 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")* was created by *[markfell](/forum/user/27962-markfell "View markfell's Profile")*

-- HikaShop version -- : 4.5.1
-- Joomla version -- : 4.1.3
-- PHP version -- : 7.3.27
-- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)

Hi,

Is this a possible option?

If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?

Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.

Is there some display code that I need to change?

Regards,
MSF

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQ0MjYtZGlzcGxheS1jdXN0b20tZmllbGQtYWZ0ZXItY2hhcmFjdGVyaXN0aWNzLWNob3Nlbj90bXBsPW1hcmtkb3du) 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: 86556
- Thank you received: 14305
-
-

4 years 5 months ago [\#341702](#341702) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341702 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")*

Hi,

There is no option to do that.
This can be done with custom javascript code added to the page. Here is a thread on that same subject :
[ www.hikashop.com/support/forum/product-c...eristics.html#329128](https://www.hikashop.com/support/forum/product-category-display/901807-dependent-characteristics.html#329128)

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

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

- **[markfell](/forum/user/27962-markfell "View markfell's Profile")**
- [![markfell's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27962.png)](/forum/user/27962-markfell "View markfell's Profile") Topic Author
- [ Offline](/forum/user/27962-markfell)

Less More

- Posts: 135
- Thank you received: 5
-
-

4 years 5 months ago [\#341715](#341715) by [markfell](/forum/user/27962-markfell "View markfell's Profile")  Replied by *[markfell](/forum/user/27962-markfell "View markfell's Profile")* on topic *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341715 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")*

Hi,

Where do I inject this code ?

Regards,
MSF

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

- **[markfell](/forum/user/27962-markfell "View markfell's Profile")**
- [![markfell's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27962.png)](/forum/user/27962-markfell "View markfell's Profile") Topic Author
- [ Offline](/forum/user/27962-markfell)

Less More

- Posts: 135
- Thank you received: 5
-
-

4 years 5 months ago [\#341716](#341716) by [markfell](/forum/user/27962-markfell "View markfell's Profile")  Replied by *[markfell](/forum/user/27962-markfell "View markfell's Profile")* on topic *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341716 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")*

Hi,

I think it should go something like this ??

&lt;script&gt;
window.Oby.registerAjax("hkAfterUpdateVariant", my_custom_function);
function my_custom_function() {
if(document.getElementById('hikashop_product_characteristic_36').value == 'Yes') {
document.getElementById('hikashop_product_custom_item_value_17').style.display = 'block';
} else {
document.getElementById('hikashop_product_custom_item_value_17').style.display = 'none';
}
}
my_custom_function();
&lt;/script&gt;

Based on the code from the page:

&lt;div id="hikashop_product_characteristics" class="hikashop_product_characteristics"&gt;
&lt;table class="hikashop_product_characteristics_table"&gt;&lt;tr class="hikashop_characteristic_line_36" data-characrow="1"&gt;&lt;td&gt;Powder Coated:&lt;/td&gt;&lt;td&gt;&lt;select id="hikashop_product_characteristic_36" name="hikashop_product_characteristic[36]" class="custom-select" size="1" onchange="return hikashopVariantSelected(this);" data-characteristic="1" data-last="1"&gt;
&lt;option value="" selected="selected"&gt;Please select&lt;/option&gt;
&lt;option value="34"&gt;No&lt;/option&gt;
&lt;option value="35"&gt;Yes&lt;/option&gt;
&lt;/select&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;!-- CUSTOM ITEM FIELDS --&gt;
&lt;div id="hikashop_product_custom_item_info" class="hikashop_product_custom_item_info"&gt;
&lt;table class="hikashop_product_custom_item_info_table"&gt;
&lt;tr id="hikashop_item_colouroptions" class="hikashop_item_colouroptions_line"&gt;
&lt;td class="key"&gt;
&lt;span id="hikashop_product_custom_item_name_17" class="hikashop_product_custom_item_name"&gt;&lt;label for="colouroptions"&gt;Colour-options&lt;/label&gt;&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;span id="hikashop_product_custom_item_value_17" class="hikashop_product_custom_item_value"&gt;&lt;input id="colouroptions" onchange="window.hikashop.toggleField(this.value,'colouroptions','item',0);" class="inputbox" type="text" name="data[item][colouroptions]" value="None" /&gt;&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;

Regards,
MSF

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQ0MjYtZGlzcGxheS1jdXN0b20tZmllbGQtYWZ0ZXItY2hhcmFjdGVyaXN0aWNzLWNob3Nlbj90bXBsPW1hcmtkb3du) 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: 86556
- Thank you received: 14305
-
-

4 years 5 months ago [\#341717](#341717) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341717 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")*

Hi,

This depends on how your HikaShop product page is configured.
In your case, you're apparently using the default product page layout and thus you'll want to add such code in the file product / show_default via the menu Display&gt;Views.
Note that as explained on that other thread, you can't just copy/paste the code. You also need to replace XXX, YYY and ZZZ by the corresponding values.
On your link, XXX should become hikashop_product_characteristic_36 and YYY should be 35 and ZZZ should be hikashop_item_colouroptions

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

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

- **[markfell](/forum/user/27962-markfell "View markfell's Profile")**
- [![markfell's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27962.png)](/forum/user/27962-markfell "View markfell's Profile") Topic Author
- [ Offline](/forum/user/27962-markfell)

Less More

- Posts: 135
- Thank you received: 5
-
-

4 years 5 months ago [\#341750](#341750) by [markfell](/forum/user/27962-markfell "View markfell's Profile")  Replied by *[markfell](/forum/user/27962-markfell "View markfell's Profile")* on topic *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341750 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")*

Hi Nicolas,

Once again, you show your coding talents with this software.

Thank you, works a treat.

Is there a way to have an API into Facebook shop?

Regards,
MSF

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQ0MjYtZGlzcGxheS1jdXN0b20tZmllbGQtYWZ0ZXItY2hhcmFjdGVyaXN0aWNzLWNob3Nlbj90bXBsPW1hcmtkb3du) 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: 86556
- Thank you received: 14305
-
-

4 years 5 months ago [\#341753](#341753) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display Custom Field after Characteristics chosen](/forum/26-product-category-display/904426-display-custom-field-after-characteristics-chosen#341753 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.3 -- PHP version -- : 7.3.27 -- Browser(s) name and version -- : Brave Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)  Hi,  Is this a possible option?  If I have two options in my Characteristics (yes / no), if yes is chosen, can I then display a custom text field?  Ive looked and read the doco, set up my custom field and have it displayed as soon as the Product is chosen, but the Characteristics is set to no by default and the custom field is there.  Is there some display code that I need to change?  Regards, MSF")*

Hi,

Thanks !
You mean you want to send your products to a feacebook shop ? You can do that with the Google Products plugin preinstalled in HikaShop. It can generate a XML file of your products data which can be imported manually or periodically into Google Shopping and a Facebook shop:
[ www.facebook.com/business/help/125074381...2?id=725943027795860](https://www.facebook.com/business/help/125074381480892?id=725943027795860)

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

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

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