Hi,
this you can do by validating the "short text question" with Regular Expression.
/^[1-9][0-9]{3}[A-Z]{2}$/
Assuming that a Nederlands postcode doesn't start with "0"
Otherwise
/^[0-9]{4}[A-Z]{2}$/
You may read here for "Regular Expressions"
[url]
www.limesurvey.org/manual/Using_regular_expressions
[/url]
To add: the blank between digits and letters.
Or you can use an inputMask.
With the plugin "jquerySimpleMask"
[url]
gitlab.com/SondagesPro/QuestionSettingsType/jquerySimpleMask
[/url]
And there is another inputmask
Just enter this javascript snippet, that inserts this inputmask
[url]
github.com/RobinHerbots/Inputmask
[/url]
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': '9999 AA',
'placeholder': '_',
'removeMaskOnSubmit': false,
'rightAlign': false,
});
});
</script>
Joffm
And to avoid holch's confusion.
Don't ask different things in one thread. Open a new one.
And a recommeandation: read the manual about question types.
[url]
www.limesurvey.org/manual/Question_types
[/url]