Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select multiple and hidden field #1581

Closed
enchikiben opened this issue Oct 18, 2012 · 7 comments
Closed

select multiple and hidden field #1581

enchikiben opened this issue Oct 18, 2012 · 7 comments
Assignees
Milestone

Comments

@enchikiben
Copy link

If the select multiple nothing is selected, nothing is sent to the server, you need to add a hidden field similar to the checkbox.

<form method="post"> 
<input type="hidden" value="" name="a[b]">
<select name="a[b][]" multiple="multiple">
<option value=""></option>
<option value="34">25</option>
<option value="35">30</option>
<option value="36">35</option>
<option value="37">40</option>
<option value="38">45</option>
</select>
<input type="submit" value="Save">
</form>​
@creocoder
Copy link
Contributor

Vote for this feature.

@creocoder
Copy link
Contributor

@enchikiben Do not close issue until PR will be merged! Repo collabs will close it after merge.

@enchikiben enchikiben reopened this Oct 18, 2012
@enchikiben
Copy link
Author

@creocoder, what you've done very well, but the name of the hidden element must be an array, or an array comes with one element, and the default value, it is necessary that the array was not.

<input type="hidden" value="" name="a[b]">

the name of the hidden field must not be an array


имя скрытого поля не должно быть массивом, иначе приходит массив с одним элементом... а должно приходить только значение.

@creocoder
Copy link
Contributor

@enchikiben Yes, i change PR status to "Work in progress". Will fix it today.

@creocoder
Copy link
Contributor

Fixed

@ghost ghost assigned mdomba Oct 19, 2012
mdomba added a commit that referenced this issue Oct 20, 2012
@mdomba mdomba closed this as completed Oct 20, 2012
@mdomba
Copy link
Member

mdomba commented Oct 20, 2012

@creocoder Nice work!

@creocoder
Copy link
Contributor

@mdomba Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants