Skip to content

Form POST processing fails to properly handle multiselects #14

@farmerpaul

Description

@farmerpaul

If your form has a multiselect (<select multiple>), then the form processing done by History.js fails to read its selected values correctly. The issue is on this line:

    for (var i = 0, len = elements.length, el; i < len; i++) {
      el = elements[i]
      var name = el.name
      if (!name) continue
      var value = el.value // <== breaks with <select multiple>
      ...

I think that just returns the first selected element, which isn't usually what you want...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions