How to add/remove boolean attribute to an element? #835
-
Hi I saw how to set the value of an attribute with mv-attr-* here: But in case of Boolean attribute , like : is there a way to add/remove the attribute itself? Example 1: result should be: Thanks PS: setting |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hey there, have you tried |
Beta Was this translation helpful? Give feedback.
-
For information: I'm trying to build a "accordion" section which is editable in both summary/details sections in edition Mode of mavo mavo site is using it here: but this code, is too complicated for my level :( |
Beta Was this translation helpful? Give feedback.
Hey there,
have you tried
<input type="checkbox" checked="[true]" />
? Actually, any expression that resolves to boolean will do. So, you don’t needmv-attr-*
for this (by the way, it’s a work in progress and is not at the core yet).