Welcome to the LimeSurvey Community Forum

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

Creating a Text Mask Field for Users.

  • VanguardAppraisals
  • VanguardAppraisals's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #210130 by VanguardAppraisals
Creating a Text Mask Field for Users. was created 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.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #210134 by Joffm
Replied by Joffm on topic Creating a Text Mask Field for Users.
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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
4 years 1 month ago #210136 by DenisChenu
Replied by DenisChenu on topic Creating a Text Mask Field for Users.

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.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #210167 by holch
Replied by holch on topic Creating a Text Mask Field for Users.

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