V
V
Vermut7562017-02-16 16:57:03
JavaScript
Vermut756, 2017-02-16 16:57:03

Why is the field type=hidden of the same name created for input type=file, for example, in yii2?

<div class="form-group field-fruit-screens">
<input type="hidden" name="Fruit[screens]" value="">
<input type="file" id="fruit-screens" name="Fruit[screens]">
<div class="help-block"></div>
</div>

This is how the form element turns out in yii2.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2017-02-16
@Sanasol

www.yiiframework.com/forum/index.php/topic/33997-f...

V
VitaliyKaliuzhyn, 2017-02-16
@VitaliyKaliuzhyn

Because if you do not upload the file, then your hidden input will be sent to the server, and if you add the file, then it’s yours, such is the system. What in any case should be sent infa

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question