Is it possible to have a question with short text and have the answer masked as they type it? Say if we were having a user type in their ID number or last 4 digits of a sensitive number?
Hi! Thanks for the reply. I'm trying to figure out as well as search how to create a custom question and find where I can change the input type but I'm not getting anywhere. Can you offer some help? I'm running version 3.7
No worries, I tried doing some research and reading, but was unable to figure out a way to do this. Whenever you have a free moment if you could give me some advice on how to accomplish this. I would be greatful.
1) Copy the directory /themes/question/browserdetect to /upload/themes/question/.
2) Rename the new directory "password".
3) Delete the directory /upload/themes/question/password/survey/questions/answer/shortfreetext/assets.
4) Edit the file /upload/themes/question/password/survey/questions/answer/shortfreetext/config.xml so it looks something like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<!-- These metadata will be displayed in the template configuration page. They are not used for now. -->
<metadata>
<name>password</name>
<creationDate>01/05/2018</creationDate>
<author>Tony Partner</author>
<license>GNU General Public License version 2 or later</license>
<version>1.0</version>
<apiVersion>1</apiVersion>
<description>Password input (masked characters)</description>
</metadata>
<!--
CSS/JS files to load.
Any files here will be loaded via the asset manager (when in config.php debug = 0)
-->
<files>
<css>
</css>
<js>
</js>
</files>
<custom_attributes>
</custom_attributes>
<!-- Datas about how LimeSurvey should load the core js/css of the question -->
<engine>
<load_core_css>true</load_core_css>
<load_core_js>true</load_core_js>
<show_as_template>true</show_as_template>
<show_as_question_type>true</show_as_question_type>
</engine>
</config>
5) Edit the file /upload/themes/question/password/survey/questions/answer/shortfreetext/text/item.twig so it looks something like this:
This is awesome, thank you very much. Two questions
1. Why does one have to delete the assets folder? If I delete the assets folder, it breaks the form and it doesn't load the page properly. If I copy the assets folder from the browserdetect question theme, it works fine. -- not a big issue, it appears this is working fine for me.
2. Within a question group, how can I require that the answer provided for Q1 be an exact match for Q2? Meaning, take what the user inputted into Q1 and require that they type the exact same thing in Q2 as well as keep the answer masked or as type "password"