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

#   champ perso Please specify a correct attribute

##

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

10 years 8 months ago [\#230022](#230022) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[champ perso Please specify a correct attribute](/forum/5-support-en-francais-french-support-/882316-champ-perso-please-specify-a-correct-attribute#230022 "-- HikaShop version -- : 261 -- Joomla version -- : 348 -- Error-message(debug-mod must be tuned on) -- : Please specify a correct attribute  Bonjour  dans les Attributes des champs perso il est impossible d'avoir un - (tiret) datahidden=&quot;off&quot;  marche , mais pas data-hidden=&quot;off&quot; ce qui fait qu'on ne peut pas utiliser de data-attributes qui doivent tous etre prefixés de data-, et les recuperer par exemple en jquery avec .data()")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

-- HikaShop version -- : 261
-- Joomla version -- : 348
-- Error-message(debug-mod must be tuned on) -- : Please specify a correct attribute

Bonjour

dans les Attributes des champs perso il est impossible d'avoir un - (tiret)
**datahidden="off"**  marche , mais pas **data-hidden="off"** ce qui fait qu'on ne peut pas utiliser de data-attributes qui doivent tous etre prefixés de **data-**, et les recuperer par exemple en jquery avec .data()

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

- **[Farida](/forum/user/39293-farida "View Farida's Profile")**
- [![Farida's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39293.png)](/forum/user/39293-farida "View Farida's Profile")
- [ Offline](/forum/user/39293-farida)

Less More

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

10 years 8 months ago [\#230089](#230089) by [Farida](/forum/user/39293-farida "View Farida's Profile")  Replied by *[Farida](/forum/user/39293-farida "View Farida's Profile")* on topic *[champ perso Please specify a correct attribute](/forum/5-support-en-francais-french-support-/882316-champ-perso-please-specify-a-correct-attribute#230089 "-- HikaShop version -- : 261 -- Joomla version -- : 348 -- Error-message(debug-mod must be tuned on) -- : Please specify a correct attribute  Bonjour  dans les Attributes des champs perso il est impossible d'avoir un - (tiret) datahidden=&quot;off&quot;  marche , mais pas data-hidden=&quot;off&quot; ce qui fait qu'on ne peut pas utiliser de data-attributes qui doivent tous etre prefixés de data-, et les recuperer par exemple en jquery avec .data()")*

Bonjour,

En effet les attributs comportant un tiret ne sont pas acceptés. Afin qu'il soit possible d'ajouter un tiret à vos attributs il vous suffit de remplacer dans le fichier administrator\components\com_hikashop\classes\field.php
la ligne suivante :
if(!preg_match('#^([a-z0-9_]+ *= *"[\p{L}\p{N}\p{Z} ]+" *)* *$#i', $fieldOptions)){
par celle-ci :
if(!preg_match('#^([a-z0-9_-]+ *= *"[\p{L}\p{N}\p{Z} ]+" *)* *$#i', $fieldOptions)){

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

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

10 years 8 months ago -  10 years 8 months ago [\#230113](#230113) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[champ perso Please specify a correct attribute](/forum/5-support-en-francais-french-support-/882316-champ-perso-please-specify-a-correct-attribute#230113 "-- HikaShop version -- : 261 -- Joomla version -- : 348 -- Error-message(debug-mod must be tuned on) -- : Please specify a correct attribute  Bonjour  dans les Attributes des champs perso il est impossible d'avoir un - (tiret) datahidden=&quot;off&quot;  marche , mais pas data-hidden=&quot;off&quot; ce qui fait qu'on ne peut pas utiliser de data-attributes qui doivent tous etre prefixés de data-, et les recuperer par exemple en jquery avec .data()")*

et ce sera inclus dans les prochains correctifs ? car bien sur tous les data-attributes prennent un tiret, sans ça on ne peut pas utiliser ce champ attributs

merci pour l'aide
Code:

$attributes = '#^([a-z0-9_-]+ *= *"[\p{L}\p{N}\p{Z} ]+" *)* *$#i'; if(!preg_match($attributes, $fieldOptions['attribute'])){ $this-&gt;errors[] = 'Please specify a correct attribute'; return false; }

Last edit: 10 years 8 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

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

- **[Farida](/forum/user/39293-farida "View Farida's Profile")**
- [![Farida's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39293.png)](/forum/user/39293-farida "View Farida's Profile")
- [ Offline](/forum/user/39293-farida)

Less More

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

10 years 8 months ago [\#230141](#230141) by [Farida](/forum/user/39293-farida "View Farida's Profile")  Replied by *[Farida](/forum/user/39293-farida "View Farida's Profile")* on topic *[champ perso Please specify a correct attribute](/forum/5-support-en-francais-french-support-/882316-champ-perso-please-specify-a-correct-attribute#230141 "-- HikaShop version -- : 261 -- Joomla version -- : 348 -- Error-message(debug-mod must be tuned on) -- : Please specify a correct attribute  Bonjour  dans les Attributes des champs perso il est impossible d'avoir un - (tiret) datahidden=&quot;off&quot;  marche , mais pas data-hidden=&quot;off&quot; ce qui fait qu'on ne peut pas utiliser de data-attributes qui doivent tous etre prefixés de data-, et les recuperer par exemple en jquery avec .data()")*

Oui, cela sera corrigé dans la prochaine release.

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

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

10 years 8 months ago [\#230155](#230155) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[champ perso Please specify a correct attribute](/forum/5-support-en-francais-french-support-/882316-champ-perso-please-specify-a-correct-attribute#230155 "-- HikaShop version -- : 261 -- Joomla version -- : 348 -- Error-message(debug-mod must be tuned on) -- : Please specify a correct attribute  Bonjour  dans les Attributes des champs perso il est impossible d'avoir un - (tiret) datahidden=&quot;off&quot;  marche , mais pas data-hidden=&quot;off&quot; ce qui fait qu'on ne peut pas utiliser de data-attributes qui doivent tous etre prefixés de data-, et les recuperer par exemple en jquery avec .data()")*

genial !

merci

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

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

[](#top)
