survey js submit survey with api call
See original GitHub issueAre you requesting a feature, reporting a bug or ask a question?
requesting a feature
What is the current behavior?
When survey is completed shows the html text indicating survey is completed
What is the expected behavior?
when submit a survey, may I have a customized post api call inside it, please? Is there any chance that I could add a cancel button beside it, or do you have this function provided?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
model.onComplete.add(function(result) {
document.querySelector('#container').innerHTML = "<div class='panel'><h2>Survey has been submitted</h2>" ;
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (12 by maintainers)
Top Results From Across the Web
survey js submit survey with api call · Issue #497
Are you requesting a feature, reporting a bug or ask a question? requesting a feature What is the current behavior? When survey is...
Read more >POST api/Survey/upload
POST https://api.surveyjs.io/public/Survey/upload. Upload the file. Request Information. URI Parameters. None. Body Parameters: None. Response Information.
Read more >POST api/Surveys/create?accessKey= ...
Create a new survey. Request Information. URI Parameters. Name, Description, Type, Additional information. accessKey. Your user unique indentificator.
Read more >POST api/Survey/post
Post the survey result. Request Information. URI Parameters. None. Body Parameters. SurveyClientPostResult. Name, Description, Type, Additional information ...
Read more >Load Data to a Web Form with REST API
SurveyJS Form Library allows you to populate drop-down menus with data loaded from a REST API web service. For this purpose, drop-down form...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
working excample with custom locale for someone else from issues search: https://plnkr.co/edit/ZWAxird0m4PPZMucddEB?p=preview
@xiuzhen1103 Another way to implement it is to use the custom navigation. You may turn off showing the standard navigation button and use your own. Here is the demo: http://surveyjs.org/examples/jquery/survey-customnavigation/ As for button text, there is an easy solution as well. Here is the list of properties to change the buttons text: survey.pagePrevText, survey.pageNextText and survey.completeText.
Thank you, Andrew