approving a answer by a password that is different to token

More
1 month 1 week ago #172589 by TRCBerlin
TRCBerlin created the topic: approving a answer by a password that is different to token
Hello,

I’m currently working with Version 3.13.1+180629. I want to enable a user one to answer a question and let a second user approve the answer by password. So user one answers the question and user two, who is standing right next to him, needs to confirm that the answer is correct.

To solve this problem, I want to implement a password, independent from the token. That password needs to be entered by user two as an answer to a question and basically confirms the answers to the previous questions within the same question group. Important: user one must not know the password, because it would enable him to betray.

So, my question is: is it possible to type an hidden answer? Like entering a password when you’re logging in to any website like facebook, online-banking or any other type of password, where the things that you are typing get replaced by a * ?

Any help is much appreciated!

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #172591 by tpartner
tpartner replied the topic: approving a answer by a password that is different to token
You could create a custom question theme based on a short-text type question using an <input type="password"> element instead of <input type="text">.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
2 weeks 6 days ago - 2 weeks 6 days ago #173513 by TRCBerlin
TRCBerlin replied the topic: approving a answer by a password that is different to token
Thanks for your help tpartner!
I found a workaround with jquery.

Inside the answer box is a default value at the moment when opening the question (see attachment).
How can I remove it to start with an empty input?


This is the current code:
<script type="text/javascript" charset="utf-8">
       	$( document ).ready( function(){
 
   var this_self='{self.SGQA}';
   var my_targetTextBox='#answer' + this_self;
 
    $( my_targetTextBox ).attr( 'type', 'password' )
        });
</script>
Attachments:
Last Edit: 2 weeks 6 days ago by TRCBerlin. Reason: fixed attachment

Please Log in or Create an account to join the conversation.

More
2 weeks 6 days ago #173514 by tpartner
tpartner replied the topic: approving a answer by a password that is different to token
I don't see anything in the script to cause that. If you have not set a default answer for the question it may be caused by your browser.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!