I have a survey page that created with SurveyJS lib(survey-react) and I have 2 problems:
- I want to query back-end server when I click 'Next' button in the survey , if server return a true , then jump to next page , if false , stay in current page and do something else.
so what I need are:
1.to handle the event of 'Next' button myself.
2.to trigger next or previous event manually.
and the second problems is, if I have 2 input element in survey , and I want to show validation message if the amount of these two input more than 100.
is there a way to do these 2 requirements?
update: now I override the 'Next' button event by getElementsByClassName , it can excute my function, but still trigger 'nextPage()'. is there a way to prevent the default event?