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

#   Request: Allow HTML and punctuation in the “Attributes” field for custom fields

##

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

Less More

- Posts: 637
- Thank you received: 26
-
-
-

1 year 4 weeks ago [\#368905](#368905) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  *[Request: Allow HTML and punctuation in the “Attributes” field for custom fields](/forum/50-feature-request/909777-request-allow-html-and-punctuation-in-the-attributes-field-for-custom-fields#368905 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 5.3.4 -- PHP version -- : 8.3  Hi HikaShop team,  We’d like to request an improvement to the “Attributes” field in HikaShop custom fields. Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.  For example, the following works fine:  But this does not work:  Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.  This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.  Thanks a lot for considering this feature enhancement!  Best regards, Lumiga")* was created by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")*

-- HikaShop version -- : 6.1.0
-- Joomla version -- : 5.3.4
-- PHP version -- : 8.3

Hi HikaShop team,

We’d like to request an improvement to the “Attributes” field in HikaShop custom fields.
Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.

For example, the following works fine:
Code:

uk-tooltip="title: example of content ;pos: right ;offset: 50"

But this does not work:
Code:

uk-tooltip="title: Hello! or one/two ;pos: right ;offset: 50"

Code:

uk-tooltip="title: &lt;strong&gt;example of content.&lt;/strong&gt; ;pos: right ;offset: 50"

Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.

This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.

Thanks a lot for considering this feature enhancement!

Best regards,
Lumiga

---

Kind regards,
Lumiga

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

1 year 4 weeks ago [\#368909](#368909) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Request: Allow HTML and punctuation in the “Attributes” field for custom fields](/forum/50-feature-request/909777-request-allow-html-and-punctuation-in-the-attributes-field-for-custom-fields#368909 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 5.3.4 -- PHP version -- : 8.3  Hi HikaShop team,  We’d like to request an improvement to the “Attributes” field in HikaShop custom fields. Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.  For example, the following works fine:  But this does not work:  Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.  This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.  Thanks a lot for considering this feature enhancement!  Best regards, Lumiga")*

Hi,

Thanks for your feedback on this. We'll be adding a patch for this in the next version of HikaShop which is to be released in a few weeks.

The following user(s) said Thank You: [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")

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

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

Less More

- Posts: 637
- Thank you received: 26
-
-
-

1 year 4 weeks ago [\#368914](#368914) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  Replied by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")* on topic *[Request: Allow HTML and punctuation in the “Attributes” field for custom fields](/forum/50-feature-request/909777-request-allow-html-and-punctuation-in-the-attributes-field-for-custom-fields#368914 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 5.3.4 -- PHP version -- : 8.3  Hi HikaShop team,  We’d like to request an improvement to the “Attributes” field in HikaShop custom fields. Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.  For example, the following works fine:  But this does not work:  Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.  This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.  Thanks a lot for considering this feature enhancement!  Best regards, Lumiga")*

Thanks, it would also be great if this could work together with the tooltip from Regular Labs.
See here the configuration options..

[ docs.regularlabs.com/tooltips/getting-started/configuration](https://docs.regularlabs.com/tooltips/getting-started/configuration)

For the title field of a custom field, that already works. It would also be nice if that title field could be expanded to allow more characters, because right now you can’t fit longer sentences in it.

---

Kind regards,
Lumiga

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

1 year 4 weeks ago [\#368915](#368915) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Request: Allow HTML and punctuation in the “Attributes” field for custom fields](/forum/50-feature-request/909777-request-allow-html-and-punctuation-in-the-attributes-field-for-custom-fields#368915 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 5.3.4 -- PHP version -- : 8.3  Hi HikaShop team,  We’d like to request an improvement to the “Attributes” field in HikaShop custom fields. Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.  For example, the following works fine:  But this does not work:  Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.  This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.  Thanks a lot for considering this feature enhancement!  Best regards, Lumiga")*

Hi,

> it would also be great if this could work together with the tooltip from Regular Labs.

What do you mean by that ? You want to have Regular Labs tooltip tags inside UIKit tooltips ? I don't understand ?

> For the title field of a custom field, that already works. It would also be nice if that title field could be expanded to allow more characters, because right now you can’t fit longer sentences in it.

If you want more characters for the title of a custom field, go in your PHPMyAdmin, open the structure of the table hikashop_field and change the type of the field_realname column to "text" or event "longtext".
This won't be a problem for updates or anything else.

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

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

Less More

- Posts: 637
- Thank you received: 26
-
-
-

1 year 4 weeks ago -  1 year 4 weeks ago [\#368922](#368922) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  Replied by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")* on topic *[Request: Allow HTML and punctuation in the “Attributes” field for custom fields](/forum/50-feature-request/909777-request-allow-html-and-punctuation-in-the-attributes-field-for-custom-fields#368922 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 5.3.4 -- PHP version -- : 8.3  Hi HikaShop team,  We’d like to request an improvement to the “Attributes” field in HikaShop custom fields. Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.  For example, the following works fine:  But this does not work:  Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.  This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.  Thanks a lot for considering this feature enhancement!  Best regards, Lumiga")*

Forget that comment. It was more that I was deciding whether to use the one from YOOtheme or the one from RegularLabs. But the YOOtheme version works just fine.

I just noticed that I can’t add this attribute, but that’s probably been fixed in the new version as it also involves special characters.
Code:

oninput="if(this.value&gt;950)this.value=950;"

This was meant to help the customer immediately to prevent when entering a value above 950 mm.

With the other regular expression option, the check only happens after submitting the form, but the Price Calculation plugin already calculates with values that shouldn’t be allowed, which makes it confusing.
That’s why I’d like to add this attribute earlier in the process, to prevent entering more than 950 mm.

And thanks for the idea to adjust the field length in the database. ![;)](/media/kunena/emoticons/24.png ";)")

---

Kind regards,
Lumiga

Last edit: 1 year 4 weeks ago by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile").

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

1 year 4 weeks ago [\#368924](#368924) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Request: Allow HTML and punctuation in the “Attributes” field for custom fields](/forum/50-feature-request/909777-request-allow-html-and-punctuation-in-the-attributes-field-for-custom-fields#368924 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 5.3.4 -- PHP version -- : 8.3  Hi HikaShop team,  We’d like to request an improvement to the “Attributes” field in HikaShop custom fields. Currently, it’s not possible to use punctuation marks (like . or ,) or HTML tags within this field.  For example, the following works fine:  But this does not work:  Allowing punctuation and simple HTML would make it possible to create richer tooltips — for instance, to give users short explanations or hints about a field directly in the form.  This would be especially useful for YOOtheme Pro users, since it uses UIkit, which supports tooltips via the uk-tooltip attribute.  Thanks a lot for considering this feature enhancement!  Best regards, Lumiga")*

Hi,

Note that you don't need this to be added as an attribute. A cleaner way is to add it as javascript code in a view override.
For example in product / show_default.php you could add: Code:

&lt;script&gt; var field = document.getElementById("xxx"); if(field) { field.addEventListener('input', function(){ if(this.value&gt;950)this.value=950; }); } &lt;/script&gt;

where xxx is the id of the input on the page.
There are several advantages to this:
- you don't need to use the attribute setting, so there are no restrictions to what you can do in it.
- having javascript code inside the database is not "clean". Code should ideally be in files. This way, you can also have coloration on the code to make it easier to write / maintain
- you can improve this code to add a notification box and potentially other things in the future more easily.
- if you have different fields for different products, you can have all the code in one place in that override instead of spreading it in different custom fields in the database. That way, if different fields require the same processing, they can use the same function and thus avoid cod duplication.
- using addEventListener instead of oninput, onchange etc is better because you can have several listeners on an input while you can only have one oninput and one onchange, etc attribute per HTML element.
- you don't need to wait for the patch in the next version.

The following user(s) said Thank You: [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")

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