A
A
AleDv2016-03-22 19:59:18
Laravel
AleDv, 2016-03-22 19:59:18

Why is form submission not working correctly in Laravel 5?

Friends, there is a regular form for submitting data, which is validated using the jsvalidation module. At the end of the form, there are two form submit buttons.

<input type="submit" name="popular" id="sendBtnPopular" class="btn btn-warning btn-block" value="Опубликовать за 120 рублей">

and regular button
<input type="submit"  class="btn btn-primary btn-block" value="Опубликовать" />

The idea is that if the user presses the button with id=sendBtnPopular, some services are automatically assigned to him. In the controller, I track in the input'e the element with the key "popular".
The problem is that sometimes when the button with id=sendBtnPopular is clicked, the $input[popular] element is not always created. And I can't find a pattern why this is happening.
Tell me where to look? Why can the value of the button on which the form is submitted be transferred or not transferred?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2016-03-22
@Tantacula

have you tried making input type=hidden or type=text? In general, for the first time I see that for submit the name was set. submit is a button for submitting a form, not a field.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question