Highlighted

data-nl- attributes reference

jonasn92134656

25-03-2019

Hi,

Is there comprehensive documentation of the different data-nl-* attributes and their usage?

If not from Adobe officially, has anyone in the community assembled one?

It would really help when trouble shooting landing pages/email template problems.

Regards,

Jonas

Replies

Highlighted

hansangy1377908

03-04-2019

Hi, I have the same problem - unable to figure out how to make a checkbox value default to 'true' when it's checked.

Can someone from Adobe please help out?

Highlighted

hansangy1377908

03-04-2019

Through Trial and Error I've discovered that to get a checkbox/Radio button to pass 'True' into an underlying Boolean field (e.g. for emailBlacklist), you have to pass in value="True" as an html attribute to the radiobutton/checkbox html tag.

Not sure why that is but it works from my extensive testing, can anyone confirm?

Highlighted
Highlighted

davidl14970702

09-04-2019

I am using this,

onclick="document.controller.setValue('/ctx/recipient/svc/<%= subscription.@serviceName%>', this.checked ? '1' : '0', '<%= subscription.@serviceName%>');

Before you get to that, I run an API to get the context of the services for this recipient. Then that object is accessible in the DOM. So if a recipient gets to my webapp, the webapp knows the services for this person and it checks the box as a default to indicate they are currently subscribed.

I don't think it's specific to adobe. all the document.controller stuff is vanilla JS. So really you just want to use things that will work as bootstrap or vanilla JS.

Also, check out the JSAPI - File (Class)

Highlighted

jonasn92134656

10-04-2019

The reply I have gotten here on the forums from Adobe reps is that it's "not allowed" to use JS (ie stuff in <% %> tags), although it's available in landing pages/fragments and all kinds of places.

I have no idea what "not allowed" means though, and it would be great to have that clarified. I think there are inconsistencies in "not allowing" JS and at the same time not having documentation for things like data-nl-attributes.

Regards,

Jonas