Skip to content

FormPart does not handle multiple selections correctly #210

@ryukoposting

Description

@ryukoposting

FormPart can only hold one value for each form parameter. This is partly a bug in the parser (here and here) but it is also a bug in the FormPart's type definition:

FormPart* = object
    data*: OrderedTableRef[string, tuple[params: StringTableRef, body: string]]

Since the body field is string instead of seq[string], Prologue cannot properly handle data from a form input like this:

<select name="thing" multiple>
  <option value="Thing 1">Thing 1</option>
  <option value="Thing 2">Thing 2</option>
  <option value="Thing 3">Thing 3</option>
  <option value="Thing 4">Thing 4</option>
</select>

This is a pretty trivial thing to fix, but it does require API changes.

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