- Implementing the sprintr Feedback Widget in your website
- Implementing the sprintr Feedback Widget in a Mendix Application
Implementing the sprintr Feedback Widget in your website
The instructions for implementing the sprintr Feedback Widget are pretty straightforward. The only tricky part is loading in any data to prefill it with a username/email. There are 2 scenarios for loading the widget, either an AJAX app or an HTML app. The AJAX version should only use 1 index.html page, it only loads the widget once and should be placed in the respective html file. When the application regularly changes the html page, it needs to be loaded on each page.
Instructions:
- Attach the following like in your head tag:
<script type="text/javascript" src="https://my.sprintr.com/feedback/sprintrfeedback.js"></script>
<script type="text/javascript">
window.sprintrFeedback.create({'sprintrid' : 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx', allowFile : true, userdata : {
'username' : 'Anonymous',
'emailaddress' : '',
'userroles' : '',
'formName' : ''
}});
</script>
- The allowFile enables the file upload feature, this is on by default but can be disabled if so desired.
- The username is a string that is entered into the Username input field when it is opened. You can use javascript to detect a possible username for your application and use this to prefill it for the logged in user. Can be left empty or on the current ‘Anonymous’.
- Same goes for the emailaddress option, it is prefilled in the email input field.
- Userroles are hidden in the form but will be send together with the feedback and will be displayed in the Details of the feedback in sprintr.
- The formName is a hidden field as well and can be filled with a readable name for the currently active form/view. Do note that the url location is already submitted with the feedback by default in a separate field.
Implementing the sprintr Feedback Widget in Mendix Applications
Get the latest version from the Mendix Appstore and import it into your project.