Triggering a survey when a user accepts a solution
Hi,
We're looking for a way to survey our customers once they accepted a solution on our community. The goal is to survey only the user that accepted the solution, right after clicking the button.
I'm considering two options here:
- Our survey service can trigger a survey when a certain keyword is on the URL. I noticed that when a user accepts a solution, the form is submitted and the page is refreshed. I'm looking for a way to add that extra parameter to the URL when the page is refreshed. Unfortunately, that's a part of the community I don't have access as a user.
- Add a pop up with a button to launch the survey when the user clicks 'Accept as solution', but again, the page is refreshed and I'm not sure how the whole process work on the back end.
Do you have any tips or ideas?
Thanks!
<div class="InfoMessage lia-panel-feedback-inline-safe"> <div class="lia-text"> <p ng-non-bindable="" tabindex="0" role="action-succeed">Success! This post is now an accepted solution.</p> </div> </div>
After page refreshes, you will see this success message. Simply use Lithium.jQuery to find the $('.lia-panel-feedback-inline-safe [role="action-succeed"]') and test if the text match "Success! This post is now an accepted solution.". Do not hard code this text, but use ${text.format("xxx")?js_string}
If it passes the test, then you can trigger the survey.
If it helps, a kudo :)