Mask Character in UK Bank Sort Codes

Más
1 mes 2 semanas antes #192527 por marcgold
We have a survey setup to collect bank details as part of the survey.
UK Sort Codes (the code for a specific Bank Branch) are 6 digits long and are 3 sets of 2 digits each.

Often they are written:

Option 1: 00-00-00 (dash separated) or
Option 2: would be laid out as 3 separate fields of 2 numerics each like this [ ] - [ ] - [ ]

The dashes are only for display only and are not needed on the export. In fact it makes it a mess if they are exported.

Does anyone have any bright ideas on how we could achieve this.


Limesurvey Version 3.21

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

LimeSurvey Partners
Más
1 mes 2 semanas antes #192534 por DenisChenu
Hi,

If i remind you can install plugin ?
gitlab.com/SondagesPro/QuestionSettingsType/jquerySimpleMask

See igorescobar.github.io/jQuery-Mask-Plugin/ for sample

You need to use text question type and for mask : 00-00-00

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #192537 por marcgold
Respuesta de marcgold sobre el tema Mask Character in UK Bank Sort Codes
Hi Denis,

Thanks for this very useful for others areas, but unfortunately doesn't quite meet this use case.

The problem is that I only want to show the mask on the front end to assist the user. Currently I have the field set to Short Text 6 Chars Long and Numbers Only.

The Mask I have used is 00-00-00

The plugin breaks that logic i'm afraid as it actually adds the "-" into the field meaning its no longer a number. The other issue is when you export this it exports the "-" as well - which really messes with our process.

What I was hoping was a Mask that is for display only.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #192538 por Joffm
Respuesta de Joffm sobre el tema Mask Character in UK Bank Sort Codes


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes - 1 mes 2 semanas antes #192539 por tpartner
Respuesta de tpartner sobre el tema Mask Character in UK Bank Sort Codes
You can use RobinHerbots Inputmask plugin with the "removeMaskOnSubmit" option to remove unwanted characters in the data.

<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': '99-99-99',
			'placeholder': '_',
			'removeMaskOnSubmit': true,
			'rightAlign': false
		});
	});
</script>

Sample survey attached:

Archivo Adjunto:

Nombre del Archivo: limesurvey...5696.lss
Tamaño del Archivo:15 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Adjuntos:
Última Edición: 1 mes 2 semanas antes por tpartner.
El siguiente usuario dijo gracias: DenisChenu, marcgold, Joffm

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #192570 por marcgold
Respuesta de marcgold sobre el tema Mask Character in UK Bank Sort Codes
Thank you all so much for some excellent ideas. Tpartners solution is the one that best and easily fits the use case.

Denis's solution is the most comprehensive and being a plugin is the easiest to implement across multiple uses.

@DenisChenu - Is there any way to add the function "'removeMaskOnSubmit': true," that is in the JS into the plugin - this would make your plugin just perfect

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes - 1 mes 2 semanas antes #192572 por DenisChenu

marcgold escribió: @DenisChenu - Is there any way to add the function "'removeMaskOnSubmit': true," that is in the JS into the plugin - this would make your plugin just perfect

No, it's not the same plugin.

But can unmask when submit … but still : value is not number … then limesurvey show a JS error.

Maybe the other plugin can return "real' value too when using .val() in JS ?

PS : OK : github.com/RobinHerbots/Inputmask#autounmask is here.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Última Edición: 1 mes 2 semanas antes por DenisChenu.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión