D
D
Dmitry Borisov2019-05-10 13:43:03
HTML
Dmitry Borisov, 2019-05-10 13:43:03

Is it possible for exhibitions to input a mask on a model in a product when registering a product?

The question is more for those who know Opencart, but still, maybe this does not affect at all.
How to properly bind an input mask when creating a product model? For example, you need a type of mask in numbers and no more than 5?
There is a value that displays the product model in admin/view/template/catalog/ in the product_form.twig file:

<label class="col-sm-2 control-label" for="input-model">{{ entry_model }}</label>
                <div class="col-sm-10">
                  <input type="text" name="model" value="{{ model }}" placeholder="{{ entry_model }}" id="input-model" class="form-control" />
                  {% if error_model %}
                  <div class="text-danger">{{ error_model }}</div>
                  {% endif %}</div>
              </div>

but any attempt to embed the .mask value or change the placeholder - nothing changes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Leonid, 2019-05-15
@caballero

for this, in HTML5 there is a pattern tag in which you can enter the regular expression
pattern="[0-9]{1,5}+" something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question