Comments (4)
Hey @VladEfanovNewton ,
Pre-loading survey with existing results; I think there are two parts of this: A) you have to persist previous results and B) you'd need to populate the survey object.
-
For A) check out #79 - I think you could use the toJson and fromJson methods implemented there and store the results in your DB.
-
For B) this functionality is not yet implemented in the plugin. If you're interested in doing it, maybe start by looking around in
survey_presenter.dart
. I'd think changing theSurveyPresenter()
constructor to get the pre-loadedSurveyResult
object and init theSet<QuestionResult> results
field with that (instead of setting it empty) could work. At that point you'd need to change how you callSurveyPresenter()
insurvey_kit.dart
but it might not be a lot of work actually altogether. -
Alternatively, if your questionnaire is not too long, you might get away with using something else. For example form-management plugins like
reactive_forms or
flutter_form_builder
that are more fine-tuned for realtime validation and can pre-populate form fields with existing values.
Logging: you can only catch navigation events and e.g. log something when those happen (see SurveyController
), listening to single user taps (selections of an answer) is not provided by the plugin.
I'd start at looking at createView()
in question_step.dart
: all the different answer view types would probably need to provide an onAnswerChanged()
or similar callback that you can then use at QuestionStep level... It would be certainly more effort to implement than the previous point.
Both features would be very nice to have though so consider opening separate new tickets for enhancement.
from survey_kit.
Very much interested to see B) implemented. @adar2378
from survey_kit.
@Numoy Any plan for this? We would also like to prefill the survey with previously completed results from the user.
from survey_kit.
I will try to integrate this with the next feature release!
from survey_kit.
Related Issues (20)
- How to use Padding to show questions?
- Get ordered type from json file.
- I wish there was a function to reset the result value.
- Add support for navigating back when initial step is present
- How to have EDIT functionality in the form?
- added this dep and ran the project this error pops up ? HOT 1
- Years of the calendar are not showing with flutter version 3.10 (stable) HOT 1
- Example not working HOT 1
- Navigate to next question without using next button HOT 2
- BooleanAnswerView isOptional not functioning as expected. HOT 1
- onNextStep not working HOT 1
- Question: Any way to pick up intermediary results? HOT 1
- Is it possible to save the results as we go to the next question so that problems wont arise if its a very lengthy survey? HOT 1
- how to have more than one question per question step? HOT 1
- example app does not build/run HOT 5
- Custom Step / Custom Slider HOT 5
- Conditional rule does not trigger when selecting multiple answer using json tasks
- Only accept either background color or decoration on SurveyKit.
- scaling answer in ios
- flutter_platform_widget issue after flutter upgrade to 3.16.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from survey_kit.