Graham Quince Posted February 26, 2019 Share Posted February 26, 2019 Hi everyone, @adamw has just shared with me a really cool bit of code our widgets use to listen to the Select User widget: 'broadcast.selectedUser': function(el, ev, options) { /* do something */ /* selected user's UUID: options.model.attr('uuid') username: options.model.attr('username') display name: options.model.attr('displayname') */ } Pop the broadcast function in as it's own "entity" Enjoy Link to comment Share on other sites More sharing options...
Graham Quince Posted September 28, 2021 Author Share Posted September 28, 2021 The above code works for FrogCode widgets, this code works for the HTML widgetL <script> $('div[data-content-uuid="SELECT_USER_WIDGET_CONTENT_UUID"]').on('broadcast.selectedUser',function(el, ev) { console.log(ev); console.log("user name = "+ev.model.displayname); console.log("user uuid = "+ev.model.uuid); }); </script> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now