Howto save incomplete data from questiontype multiple short text

More
3 weeks 5 days ago #158882 by SurveyDennis
SurveyDennis created the topic: Howto save incomplete data from questiontype multiple short text
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?

Be SurveyFriendly too
SurveyFriendly Designer [at] SurveyFriendly [dot] com

Please Log in to join the conversation.

More
3 weeks 4 days ago - 3 weeks 4 days ago #158898 by tpartner
tpartner replied the 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

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 3 weeks 4 days ago by tpartner.
The following user(s) said Thank You: SurveyDennis

Please Log in to join the conversation.

More
3 weeks 4 days ago #158913 by SurveyDennis
SurveyDennis replied the 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).

Be SurveyFriendly too
SurveyFriendly Designer [at] SurveyFriendly [dot] com

Please Log in to join the conversation.

More
3 weeks 3 days ago - 3 weeks 3 days ago #158922 by SurveyDennis
SurveyDennis replied the 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.


<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
SurveyFriendly Designer [at] SurveyFriendly [dot] com
Last Edit: 3 weeks 3 days ago by SurveyDennis.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now