Hello!
I have survey with skipping logic created within Survey Creator.
And in SurveyJS I have property sendResultOnPageNext in order to send every choice on my backend.
But question where we have skipping logic, this onPartialSend trigger not works…
How to enable the trigger to send all question even if question has logic
Hello,
As far as I understand from our code, the "skiptrigger" focuses some following question but not changes the current page. At the same time as
sendResultOnPageNext
is performed during page change.Can you describe your case in greater details and share a sample survey JSON illustrating the issue?
Thanks, Serge
SurveyJS Team
let me explain again.
I have this code responsive for completing survey:
<Survey.Survey locale={survey.lang} currentPageNo={currentPageNum} json={survey.structure} onTextMarkdown={onMarkDownTextHandler} onUploadFiles={onUploadFilesToServer} onCurrentPageChanged={onCurrentPageChanged} showCompletedPage={false} onComplete={onComplete} **onPartialSend**={onPartialSend} **sendResultOnPageNext** data={survey.answerStructure} pageNextText={t("next")} completeText={t("complete")} />
and this code has lines: onPartialSend, sendResultOnPageNext
this onPartialSend triggers on every question completion, but in a case when there are logic in particular question - onPartialSend ignores it.
For example:
If in one question I have logic on choice like:** if users selects on question2 -> choice = "No" = go question34**, and result of question2 (No) don't send
How to make onPartialSend to send every question whenever it is question with logic or not
Additionally, example of trigger:
"triggers": [ { "type": "skip", "expression": "{вопрос31} = 'Вариант2'", "gotoName": "вопрос33" },
As you can see, here is some logic on specific choice. And when I click on this choice - it goes on question "вопрос33" immediately, even if I didn't clicked next question button (i need to make it to wait until user clicks next question button)
Hello,
Thank you for the clarifications. Yes, the
sendResult
function is not called during page changed on skip trigger execution.It looks like a bug for me. We'll discuss this issue with the team and update this thread.
Thanks, Serge
SurveyJS Team
I found this property
SurveyCore.settings.executeSkipTriggerOnValueChanged = false;
and it works for me, thanks
Great!
Andrew
SurveyJS Team