Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Creating a Text Mask Field for Users.

More
4 years 7 months ago #210130 by VanguardAppraisals
My company is currently using LimeSurvey Version 3.23.4. We have a question that requires users to type in like XXX-XXX-XXX. X could be numbers or letters.

Is there a way to create a simple text mask that includes the format below including the hyphen in between:

xxx-xxx-xxx


If there is a way, how would we implement that into the system. We tried downloading a third party j-query type plugin, but it is not working and the plugin manager is not recognizing it. Is there a simple way to do a special format?
The topic has been locked.
More
4 years 7 months ago #210134 by Joffm
Hi,
you can use
github.com/RobinHerbots/Inputmask

Here my question code
Code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/inputmask/4.0.9/jquery.inputmask.bundle.min.js"></script> <script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){ 
    $('#question{QID} input[type="text"]').inputmask({
      'mask': '***-***-***',
      'placeholder': '_',
      'removeMaskOnSubmit': false,
      'rightAlign': false,
    });
  });
</script>





Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
4 years 7 months ago #210136 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
4 years 7 months ago #210167 by holch

the plugin manager is not recognizing it

The LS plugin manager is for LS plugins, not for third party plugins.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose