salomancho
Forum Replies Created
-
Forum: Plugins
In reply to: [Gutenberg] How do I enable custom fields in the Gutenberg editori have the same issue, that code doesn’t help, did you solve it?
Thanks, paco, stellar support for a free plug. I am planing get the notification addon soon. is there a discount code for it?
hey paco, I resolved this by having the page reload via javascript when users visit from the questionnaire. it works. I wanted to share this in case somebody else looking for this:
here is the code to place on the page you want to trigger:
let urlHistory = window.history;
if(urlHistory === “https://community.anxietysocialnet.com/social-anxiety-self-assessment-test/”){
location.reload();
}thanks for the support!
I think I confused you, I do see the pages on the backend. let me try to clarify with bullets:
1) I created a custom quiz and added the code in element.
2) there are 5 different results and for each result, there is a page.
3) when the javascript calculates the score it redirects to the trigger page, but instead of the user clicking the actual link it uses “window.location.assign(“/zero-symptoms/”);”
4) when you physically click on the link, the badge gets awarded. but this javascript does not do it.any other idea on how I can set this up so it work with gamipress, the questionnaire need custom java for the score calculation, so mus quizzes plugins will not do the trick.
Thanks again for all the support, it is apreciated!
ok after digging further I found out what is the problem, when I go to the badge itself and I click the link I get awarded that badge, problem is that when the user fill out the questionnaire it doesn’t trigger:
https://community.anxietysocialnet.com/social-anxiety-self-assessment-test/
at the ned of the questionnaire they re redirected via javascript:
// Use a series of if-else statements to redirect to a different page based on the score range
if (avgScore === 0) {
window.location.assign(“/zero-symptoms/”);
} else if (avgScore > 0 && avgScore <= 1) {
window.location.assign(“/mild-symptoms/”);
} else if (avgScore > 1 && avgScore <= 2) {I am guessing this is not supported, is there any way to make it trigger?
thanks again!
(i am using social iv theme, the other issue is sorted already)
hi, thanks again I did try before bu it was not showing any pages in the selector only posts…
the problem was I was using the badge link itself instead of the page. I resolved it by converting the pages to posts and selecting them. but still, two problems remain.
1) triggered badges I see in the backend are not showing in front end user profiles badges section
2) it will be better for me if I can use pages for this, as I have more freedom to design these pages as I like, is there any way to do this for pages instead of posts?
thanks again!