Pro forms input field data attributes

When attempting to add a disabled data attribute, I encountered an issue—the attribute was being added to the parent div rather than the intended input field. How can data attributes be directly applied to input elements?

Additionally, I’m wondering if input fields can be programmatically disabled based on a conditional, for example, disabling a field if it already contains a value. Any insights on these two issues are much appreciated. Thank you in advance for your guidance.

1 Like

That was my initial thought to add the ‘checked’ attribute to a radio button as well. And I quickly found out it doesn’t work as I wanted.

Good thing that @Daniele released a quick update to provide a UI for that.