Add custom data attribute to Content Fragment Model field/data-type

Avatar

Avatar
Level 1
FL33TW00D
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
FL33TW00D
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
FL33TW00D
Level 1

05-11-2020

Hi there,

I am looking for a way to add a custom data attribute that is rendered in the DOM.

 

I have created a custom data type for Email Addresses by overlaying /libs/settings/dam/cfm/models/formbuilderconfig.

 

I have wrote some custom JavaScript that performs validation to ensure they're entered correctly.

 

However, I want to add a custom data-attribute inside the HTML for every instance of my custom data type, so that my validator can use that data-attribute as a selector.

 

Any ideas?

 

Many Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
sunjot16
Employee

Likes

106 likes

Total Posts

164 posts

Correct reply

50 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Employee
sunjot16
Employee

Likes

106 likes

Total Posts

164 posts

Correct reply

50 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
sunjot16
Employee

05-11-2020

Answers (0)