question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

survey js submit survey with api call

See original GitHub issue

Are 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:closed
  • Created 6 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
dmitrykurmanovcommented, Jul 14, 2017

working excample with custom locale for someone else from issues search: https://plnkr.co/edit/ZWAxird0m4PPZMucddEB?p=preview

1reaction
andrewtelnovcommented, Jul 14, 2017

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found