PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

paper-dropdown-menu / paper-listbox : send label instead the value in the request #274

Open PPCM opened 6 years ago

PPCM commented 6 years ago

I have paper-listbox element in a paper-dropdown-menu, values of items are different from labels. Here is the example

<paper-dropdown-menu label="Gender" name="gender" required error-message="Gender is required">
   <paper-listbox slot="dropdown-content" attr-or-property-name="value">
      <paper-item value="M">Male</paper-item>
      <paper-item value="F">Female</paper-item>
   </paper-listbox>
</paper-dropdown-menu>

But in the post, the label is given instead of the value of the item

Any idea to have gender=M or gender=F in the request?

Actual outcome

Actually the output request contains gender=Male or gender=Female

Browsers Affected

jakebeatty commented 6 years ago

change attr-or-property-name to attr-for-selected