UI Builder - Changing component properties via script & Set input focus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 06:45 AM
Two questions,
In UI Builder is it possible to change component properties via script or is data binding the only way to do this? I can see gform in the api auto complete but I can’t seem to find documentation on it.
I’d also would like to set the focus to a specific input field when certain events occur. Is there a way to do this?
Thanks,
Eric.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 04:47 AM
@Eric54 any update on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 11:25 AM
I found that databinding to client state parameters is the only way to set component properties.
Still not sure where g_form is used. Perhaps it's used to get and set variables from Catalog Item when using the Catalog Item component.
As for setting the focus to an input field, I created a custom component based on the @Servicenow/input component and added the functionality to set the focus myself. I think this is an oversight from next experience component team it should really be added to all the available input types.
Eric.