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

#   Specifications - Default Value

##

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

Less More

- Posts: 11
- Thank you received: 1
-
-

3 years 1 week ago [\#356118](#356118) by [expressoshoppe](/forum/user/16127-expressoshoppe "View expressoshoppe's Profile")  *[Specifications - Default Value](/forum/26-product-category-display/907187-specifications-default-value#356118 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 5.0.0 -- PHP version -- : 8.2  I made a custom field of type WYSIWYG for my product &quot;Specifications&quot; tab.  I would like the Specifications tab to have a table of information about the product.  I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.  Is there a way to have a table as the custom field's default value?")* was created by *[expressoshoppe](/forum/user/16127-expressoshoppe "View expressoshoppe's Profile")*

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 5.0.0
-- PHP version -- : 8.2

I made a custom field of type WYSIWYG for my product "Specifications" tab.

I would like the Specifications tab to have a table of information about the product.

I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.

Is there a way to have a table as the custom field's default value?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcxODctc3BlY2lmaWNhdGlvbnMtZGVmYXVsdC12YWx1ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86321
- Thank you received: 14279
-
-

3 years 1 week ago [\#356123](#356123) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Specifications - Default Value](/forum/26-product-category-display/907187-specifications-default-value#356123 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 5.0.0 -- PHP version -- : 8.2  I made a custom field of type WYSIWYG for my product &quot;Specifications&quot; tab.  I would like the Specifications tab to have a table of information about the product.  I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.  Is there a way to have a table as the custom field's default value?")*

Hi,

Normally, that's not how you do it. You need to create one custom field for each row of information you want to display. HikaShop will display under that specifications tab a table of your custom product fields, with the values entered / selected in each custom field.

Now, I think the Wysiwyg custom field code is missing a piece to handle default values.
Add the code: Code:

if(strlen($value) &lt; 1 &amp;&amp; !empty($field-&gt;field_default)){ $value = $this-&gt;trans($field-&gt;field_default); }

before the line: Code:

$editorHelper-&gt;content = $value;

in the file administrator/components/com_hikashop/classes/field.php and it should allow you to get the custom field default value when editing a product.
Let us know how it goes so that we can add the patch for the next release.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcxODctc3BlY2lmaWNhdGlvbnMtZGVmYXVsdC12YWx1ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 11
- Thank you received: 1
-
-

3 years 1 week ago [\#356167](#356167) by [expressoshoppe](/forum/user/16127-expressoshoppe "View expressoshoppe's Profile")  Replied by *[expressoshoppe](/forum/user/16127-expressoshoppe "View expressoshoppe's Profile")* on topic *[Specifications - Default Value](/forum/26-product-category-display/907187-specifications-default-value#356167 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 5.0.0 -- PHP version -- : 8.2  I made a custom field of type WYSIWYG for my product &quot;Specifications&quot; tab.  I would like the Specifications tab to have a table of information about the product.  I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.  Is there a way to have a table as the custom field's default value?")*

I tried the code change but it does not seem to make a difference. Note that this is only an issue of the default value. Once a product is created, the WYSIWYG values display as expected.

The issue is that a table created as the Default Value is not saved with the WYSIWYG custom field.

Example:
Create the WYSIWYG custom field ("Specifications") and make a table as it's default value. Populate it with values. Save &amp; Close.
Open the field again for editing - the table structure will be lost ; only the values will remain.

Similarly, if you make a new product, the (Default) table values appear as the default, but the structure is not present.

However, if when editing a product I create a table in the custom filed called Specifications, it will stay there and display as expected.

--

I know this isn't the "right way", but my the Specifications custom field is special and I love the flexible way it works to accomodate both "information" and "data" about products. Because my products (fancy superautomatic espresso machines) have many technical characteristics, not all of which apply to every model, I'm using "Specifications" for information about the product and a bunch of other custom fields to capture values (also used for "Compare"). Having a flexible way (a simple table above the other custom fields) is great.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcxODctc3BlY2lmaWNhdGlvbnMtZGVmYXVsdC12YWx1ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86321
- Thank you received: 14279
-
-

3 years 1 week ago [\#356168](#356168) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Specifications - Default Value](/forum/26-product-category-display/907187-specifications-default-value#356168 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 5.0.0 -- PHP version -- : 8.2  I made a custom field of type WYSIWYG for my product &quot;Specifications&quot; tab.  I would like the Specifications tab to have a table of information about the product.  I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.  Is there a way to have a table as the custom field's default value?")*

Hi,

The table being stripped might be because of the "input filtering" setting of the custom field. Please try to turn that setting off in the custom field and try again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcxODctc3BlY2lmaWNhdGlvbnMtZGVmYXVsdC12YWx1ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 11
- Thank you received: 1
-
-

3 years 1 week ago [\#356175](#356175) by [expressoshoppe](/forum/user/16127-expressoshoppe "View expressoshoppe's Profile")  Replied by *[expressoshoppe](/forum/user/16127-expressoshoppe "View expressoshoppe's Profile")* on topic *[Specifications - Default Value](/forum/26-product-category-display/907187-specifications-default-value#356175 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 5.0.0 -- PHP version -- : 8.2  I made a custom field of type WYSIWYG for my product &quot;Specifications&quot; tab.  I would like the Specifications tab to have a table of information about the product.  I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.  Is there a way to have a table as the custom field's default value?")*

OK - very great. Input filtering was the problem; the additional code was not necessary. Cool.

But - there's a weird interaction between the Specifications data and the other Custom Fields data.

When the other custom fields have values, their presence shrinks the Specifications table.

Example:

Just the table in Specifications: [ j5.expressoshoppe.com/index.php/cat/product/sample-product-a](http://j5.expressoshoppe.com/index.php/cat/product/sample-product-a)

Also using other Custom Fields: [ j5.expressoshoppe.com/index.php/cat/product/sample-product-b](http://j5.expressoshoppe.com/index.php/cat/product/sample-product-b)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcxODctc3BlY2lmaWNhdGlvbnMtZGVmYXVsdC12YWx1ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86321
- Thank you received: 14279
-
-

3 years 1 week ago [\#356178](#356178) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Specifications - Default Value](/forum/26-product-category-display/907187-specifications-default-value#356178 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 5.0.0 -- PHP version -- : 8.2  I made a custom field of type WYSIWYG for my product &quot;Specifications&quot; tab.  I would like the Specifications tab to have a table of information about the product.  I made the default value of the custom field a table, but when I create new products the table format/structure is lost; only the values appear.  Is there a way to have a table as the custom field's default value?")*

Hi,

The issue is that you've added CSS to hide the name of the custom field:
[ i.imgur.com/K826Xdt.png](https://i.imgur.com/K826Xdt.png)
With your .hikashop_product_custom_specifications_line td.key { display: none; } code, the browser thinks that for the first row, the second column is now the first column, and thus the table goes on the left side (the first column).

You could change it to:
.hikashop_product_custom_specifications_line td.key { color: transparent; }
[ i.imgur.com/cIYhwKX.png](https://i.imgur.com/cIYhwKX.png)
But then it would mess the display without the other custom fields.

The best will be to not use CSS and instead do a view override of product / show_block_custom_main via the menu Display&gt;Views and make it so that the main custom field displays outside of the table of custom fields. This will require some PHP knowledge.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcxODctc3BlY2lmaWNhdGlvbnMtZGVmYXVsdC12YWx1ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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.059 seconds

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

[](#top)
