Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
Are you requesting a feature, reporting a bug or asking a question?
Question
What is the current behavior?
I have a react project using custom tabs and making use of surveyCreator.makeNewViewActive(tabName) to programmatically change the survey creator tabs (I am hiding the default ones with css). This works fine, but the issue I am having is that when editing the JSON in the JSON editor tab, those changes aren't actually being reflected when changing tabs again. I presume because I need to call my custom surveyCreator.saveSurveyFunc after the JSON has been edited, but I can't find a 'hook' or anything I can use to trigger a save on this action.
I have found and tried the code below but that's not working either.
surveyCreator.onActiveTabChanged.add(function (sender, opt) {
if (sender.JSON !== surveyCreator.JSON) {
saveSurvey(); // my custom save survey method
}
});
What is the expected behavior?
When editing the JSON in the JSON editor tab I should be able to programmatically call my custom save survey function so that the new JSON is persisted across tabs.
Are you requesting a feature, reporting a bug or asking a question?
Question
What is the current behavior?
I have a react project using custom tabs and making use of
surveyCreator.makeNewViewActive(tabName)
to programmatically change the survey creator tabs (I am hiding the default ones with css). This works fine, but the issue I am having is that when editing the JSON in the JSON editor tab, those changes aren't actually being reflected when changing tabs again. I presume because I need to call my customsurveyCreator.saveSurveyFunc
after the JSON has been edited, but I can't find a 'hook' or anything I can use to trigger a save on this action.I have found and tried the code below but that's not working either.
What is the expected behavior?
When editing the JSON in the JSON editor tab I should be able to programmatically call my custom save survey function so that the new JSON is persisted across tabs.