- Posts: 72
- Thank you received: 10
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Howto save incomplete data from questiontype multiple short text
- SurveyDennis
- Topic Author
- Offline
- Senior Member
Less
More
6 years 7 months ago #158882
by SurveyDennis
Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
Howto save incomplete data from questiontype multiple short text was created by SurveyDennis
I have a survey with just one question - multiple short text with 10 options to fill in.
Data is only saved ofcourse when you click next or finish.
But I also want to save the options when somebody didn't clicked on next or finish.
Not sure if this would be the correct approach but I was thinking the following:
Create another hidden question before the real multiple short question and save the answers there as well.
Or can I do something with Relevance equation?
Data is only saved ofcourse when you click next or finish.
But I also want to save the options when somebody didn't clicked on next or finish.
Not sure if this would be the correct approach but I was thinking the following:
Create another hidden question before the real multiple short question and save the answers there as well.
Or can I do something with Relevance equation?
Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
6 years 7 months ago - 6 years 7 months ago #158898
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Howto save incomplete data from questiontype multiple short text
I'm on vacation, working from phone, so can't offer any substantial code but I think you would need to put a listener on the keyup/change/paste events of the inputs that makes an AJAX call to a remote PHP script to update the database directly.
Or maybe the RPC update_response() method - api.limesurvey.org/classes/remotecontrol...thod_update_response
Or maybe the RPC update_response() method - api.limesurvey.org/classes/remotecontrol...thod_update_response
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 7 months ago by tpartner.
The following user(s) said Thank You: SurveyDennis
The topic has been locked.
- SurveyDennis
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 10
6 years 7 months ago #158913
by SurveyDennis
Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
Replied by SurveyDennis on topic Howto save incomplete data from questiontype multiple short text
Have a nice vacation Tony!!!
Thanks for pushing me in the right direction.
For now I have made a small workaround to save the data with php write to a file (when somethings changes in the input).
Thanks for pushing me in the right direction.
For now I have made a small workaround to save the data with php write to a file (when somethings changes in the input).
Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
The topic has been locked.
- SurveyDennis
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 10
6 years 7 months ago - 6 years 7 months ago #158922
by SurveyDennis
Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
Replied by SurveyDennis on topic Howto save incomplete data from questiontype multiple short text
Just sharing -
If you need to do the same as what I have tried you can do the following:
When the input changes from the open text it will also change the answer option from another question.
In my case I also need to do this for incomplete data but that is not working.
The example code above is just more if you want to autopunch another question.
If you need to do the same as what I have tried you can do the following:
When the input changes from the open text it will also change the answer option from another question.
Code:
<script> $(document).ready(function(){ $("#answer896439X312X1365A1").change(function(){ var inputls = document.getElementById("answer896439X312X1365A1"); $( 'input#answer896439X313X1374A1' ).val(inputls); }); }); </script>
In my case I also need to do this for incomplete data but that is not working.
The example code above is just more if you want to autopunch another question.
Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
Last edit: 6 years 7 months ago by SurveyDennis.
The topic has been locked.