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

#   How to display checkbox type field values as list?

##

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

Less More

- Posts: 4
- Thank you received: 0
-
-

11 years 8 months ago [\#190912](#190912) by [MatteoLin](/forum/user/33905-matteolin "View MatteoLin's Profile")  *[How to display checkbox type field values as list?](/forum/25-install-update/875022-how-to-display-checkbox-type-field-values-as-list#190912 "-- url of the page with the problem -- :   selmartmp.injoomla.it/it/dissalatori-progress.html  -- HikaShop version -- : 2.3.5  Hi.  I've have to solve this problem.  In product view, when displaying the table that contains product specifications, all field values set as selected checkbox options are shown as a text where the values are separated by a comma and one space. I need these values to be shown as a list with br tag following each value. Is it possible? How to do it?  Look my page, please...   selmartmp.injoomla.it/it/dissalatori-progress.html  In the table contained in , in the field labelled &quot;Alimentazione&quot;, I'd prefer that the values &quot;12V DC, (24V DC su richiesta)&quot; could be shown as  12V DC (24V DC su richiesta)  without any comma and space before the second value.  The html should be  Please, help me!!!  Thank you.")* was created by *[MatteoLin](/forum/user/33905-matteolin "View MatteoLin's Profile")*

-- url of the page with the problem -- : [ selmartmp.injoomla.it/it/dissalatori-progress.html](http://selmartmp.injoomla.it/it/dissalatori-progress.html)
-- HikaShop version -- : 2.3.5

Hi.

I've have to solve this problem.

In product view, when displaying the table that contains product specifications, all field values set as selected checkbox options are shown as a text where the values are separated by a comma and one space.
I need these values to be shown as a list with br tag following each value.
Is it possible? How to do it?

Look my page, please...
[ selmartmp.injoomla.it/it/dissalatori-progress.html](http://selmartmp.injoomla.it/it/dissalatori-progress.html)

In the table contained in Code:

div id="hikashop_product_custom_info_main"

, in the field labelled "Alimentazione", I'd prefer that the values "12V DC, (24V DC su richiesta)" could be shown as

12V DC
(24V DC su richiesta)

without any comma and space before the second value.

The html should be Code:

12V DC&lt;br /&gt;(24V DC su richiesta)

Please, help me!!!

Thank you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg3NTAyMi1ob3ctdG8tZGlzcGxheS1jaGVja2JveC10eXBlLWZpZWxkLXZhbHVlcy1hcy1saXN0P3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 8 months ago [\#190947](#190947) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to display checkbox type field values as list?](/forum/25-install-update/875022-how-to-display-checkbox-type-field-values-as-list#190947 "-- url of the page with the problem -- :   selmartmp.injoomla.it/it/dissalatori-progress.html  -- HikaShop version -- : 2.3.5  Hi.  I've have to solve this problem.  In product view, when displaying the table that contains product specifications, all field values set as selected checkbox options are shown as a text where the values are separated by a comma and one space. I need these values to be shown as a list with br tag following each value. Is it possible? How to do it?  Look my page, please...   selmartmp.injoomla.it/it/dissalatori-progress.html  In the table contained in , in the field labelled &quot;Alimentazione&quot;, I'd prefer that the values &quot;12V DC, (24V DC su richiesta)&quot; could be shown as  12V DC (24V DC su richiesta)  without any comma and space before the second value.  The html should be  Please, help me!!!  Thank you.")*

Hi,

Edit the file "show_block_custom_main" via the menu Display&gt;Views and change the line:
&lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$value); ?&gt;

to:
&lt;?php echo str_replace(', ','&lt;br/&gt;',$this-&gt;fieldsClass-&gt;show($oneExtraField,$value)); ?&gt;

The following user(s) said Thank You: [MatteoLin](/forum/user/33905-matteolin "View MatteoLin's Profile")

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

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

Less More

- Posts: 4
- Thank you received: 0
-
-

11 years 8 months ago [\#191041](#191041) by [MatteoLin](/forum/user/33905-matteolin "View MatteoLin's Profile")  Replied by *[MatteoLin](/forum/user/33905-matteolin "View MatteoLin's Profile")* on topic *[How to display checkbox type field values as list?](/forum/25-install-update/875022-how-to-display-checkbox-type-field-values-as-list#191041 "-- url of the page with the problem -- :   selmartmp.injoomla.it/it/dissalatori-progress.html  -- HikaShop version -- : 2.3.5  Hi.  I've have to solve this problem.  In product view, when displaying the table that contains product specifications, all field values set as selected checkbox options are shown as a text where the values are separated by a comma and one space. I need these values to be shown as a list with br tag following each value. Is it possible? How to do it?  Look my page, please...   selmartmp.injoomla.it/it/dissalatori-progress.html  In the table contained in , in the field labelled &quot;Alimentazione&quot;, I'd prefer that the values &quot;12V DC, (24V DC su richiesta)&quot; could be shown as  12V DC (24V DC su richiesta)  without any comma and space before the second value.  The html should be  Please, help me!!!  Thank you.")*

Thank you.

So doing it, it's OK.

Only for further information: this code editing will affect all values of custom fields, not only checkbox comma separated values... Is it true?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg3NTAyMi1ob3ctdG8tZGlzcGxheS1jaGVja2JveC10eXBlLWZpZWxkLXZhbHVlcy1hcy1saXN0P3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 8 months ago [\#191048](#191048) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to display checkbox type field values as list?](/forum/25-install-update/875022-how-to-display-checkbox-type-field-values-as-list#191048 "-- url of the page with the problem -- :   selmartmp.injoomla.it/it/dissalatori-progress.html  -- HikaShop version -- : 2.3.5  Hi.  I've have to solve this problem.  In product view, when displaying the table that contains product specifications, all field values set as selected checkbox options are shown as a text where the values are separated by a comma and one space. I need these values to be shown as a list with br tag following each value. Is it possible? How to do it?  Look my page, please...   selmartmp.injoomla.it/it/dissalatori-progress.html  In the table contained in , in the field labelled &quot;Alimentazione&quot;, I'd prefer that the values &quot;12V DC, (24V DC su richiesta)&quot; could be shown as  12V DC (24V DC su richiesta)  without any comma and space before the second value.  The html should be  Please, help me!!!  Thank you.")*

That's correct. But then you can potentially have a more complex version which does the replacing only for that custom field and not others if necessary.

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

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

[](#top)
