For working just with a webform and trying to get some info from the user to me wasn't very intuitive and working with the platform wasn't intuitive but it is workable once you know how things are done. Now a requirement for this form is that I can't use an iframe, and needs to be native to igloo, but I can send the info to the form if I kick the user back. So in this case the email form was setup as a start it was setting up an email form, where it sends data to a helpdesk system but I don't want the user to have to type in their email again because they are logged into the intranet and I should be able to get this information.
So after doing a lot of googling I came across an obscure reference on the community forum. https://customercare.igloosoftware.com/community/developer_questions/is_there_a_quick_way_to_get_the_current_user
So not being familiar with igloo I looked at the comments, and seen the question about referencing the object (since I wasn't using the API) I thought it was referenced though the WYSIWYG editor like some other CMS/LMS systems. I was wrong.
So after setting up some HTML elements I came up with this.
//Display just the first name. (does a split based on the space in the name)
const firstName=title.split(' ');
document.getElementById('staffName').innerHTML = firstName;
- 141 views
- 56 previews
- 1 version
- 3 replies
- 3 followers
- Posted By:
- Trevor Tye
- July 29, 2021
About this forum
- 5,755 views
- 62 topics
- 16 followers
Share your thoughts, ideas, and questions using this forum and help other developers and technologists build on the Igloo Platform.