function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How can i get the component root "span" tag from the inside?

I need to use some scripts on the client side with the custom component. So I need to get Id of it root tag(span). How it possible?


Tried to use {!$Component} - wrote that "Unknown property $Component" in the build time.


Basically {!$Component.idofcomponent} works for referencing the id attribute of component.If you want to refrence the span id then check your <span> tag and use {!$Component.pageid:formid:spanid}


Hope this helps.