- Posts: 14249
- Thank you received: 2576
Ask the community, share ideas, and connect with other LimeSurvey users!
Yes, but before set this to LimeSurvey we need to remove or fix Expression Manager for usage of ',' in surveyKompetenzZ wrote: Thank you very much for all the help. Yes, firefox on smartphone works perfectly, I just had to realize that mobile browsers show a special keyboard and no increase/decrease buttons.
The link you provided is very useful.
If someone else ever needs this: After the part:Code:<input type="number"
in the twig files some settings can be added, especially a minimum and maximum can be set, so that the spinners cannot operate to undesired number ranges. Also a placeholder "0" at the begin can be displayed:
value="{% if (integeronly == 1 and fValue != "") %}{{ intval(fValue) }}{% else %}{{ fValue }}{% endif %}"
{% if integeronly == 1 %} step=1 {% else %} step="any"{% endif %}
value="{{ fValue }}"
value="{% if (integeronly == 1 and fValue != "") %}{{ intval(fValue) }}{% else %}{{ fValue }}{% endif %}"
{% if integeronly %} step=1 {% endif %}
{% if integeronly == 1 %} step=1 {% else %} step="any"{% endif %}
{# /** * Multiple short texts question, item input text Html * @var $tip * @var $alert * @var $maxlength * @var $tiwidth * @var $extraclass * @var $sDisplayStyle * @var $prefix * @var $myfname * @var $labelText * @var $sufix * @var $kpclass * @var $rows * @var $checkconditionFunction * @var $dispVal * @var $suffix */ #} <!-- answer_row --> <li id='javatbd{{ myfname }}' class="question-item answer-item numeric-item text-item form-group{{ extraclass }}{% if alert %} ls-error-mandatory has-error {% endif %}" {{ sDisplayStyle }}> <!-- color code missing mandatory questions red --> <label class="control-label col-xs-12 col-sm-{{ sLabelWidth }}{% if sLabelWidth == 0 %} hidden{% endif %}" for="answer{{myfname}}"> {{ labelText }} </label> <div class="col-xs-12 col-sm-{{ sInputContainerWidth }}"> {% if prefix or suffix %} <div class="ls-input-group"> {% endif %} {% if prefix %} <div class="ls-input-group-extra prefix-text prefix"> {{ prefix }} </div> {% endif %} <input type="number" min="0" max="10000" placeholder="0" value="{% if (integeronly == 1 and fValue != "") %}{{ intval(fValue) }}{% else %}{{ fValue }}{% endif %}" name="{{ myfname }}" id="answer{{ myfname }}" class="form-control" title="{{ gT('Only numbers may be entered in this field.') }}" {% if size %} size={{ inputsize }} {% endif %} {% if maxlength %} maxlength={{ maxlength }} {% endif %} {% if integeronly == 1 %} step=1 {% else %} step="any"{% endif %} /> {% if suffix %} <div class="ls-input-group-extra suffix-text suffix"> {{ suffix }} </div> {% endif %} {% if prefix or suffix %} </div> {% endif %} </div> </li> <!-- end of answer_row -->