wp-user-frontend icon indicating copy to clipboard operation
wp-user-frontend copied to clipboard

Floating points are not showing in order in the dropdown field.

Open nabid-anzum opened this issue 2 years ago • 1 comments

Description: Floating points are not showing in order in the dropdown field. They are there after all the integer values. If I add these options in the dropdown field,

  • 1
  • 1.5
  • 2
  • 2.5
  • 2.75
  • 3
  • 4

Then these fields are showing in this order,

  • 1
  • 2
  • 3
  • 4
  • 1.5
  • 2.5
  • 2.75

How to reproduce:

  1. Create a post form with a dropdown field.
  2. Add the following options in that dropdown field '1', '1.5', '2', '2.5', '2.75', '3', '4'. See the screenshot https://snipboard.io/CRsqdm.jpg
  3. Save the form and place it in a page.
  4. Try post an entry to that post from frontend.
  5. When you will click the dropdown field, you will find that the options are not sorted. And floating points are showing after all the integer values. See this screenshot https://snipboard.io/AQlPKe.jpg
  6. And if you go back to backend and see the field option of that dropdown field, then you will find that its not sorted there also. See the screenshot https://snipboard.io/GP0me5.jpg

Expected Behaviour: It should sort the dropdown options and then display. Like it should show in this order,

  • 1
  • 1.5
  • 2
  • 2.5
  • 2.75
  • 3
  • 4

System Status: WP User Frontend: v3.5.27 WordPress: v5.9.3

nabid-anzum avatar May 12 '22 04:05 nabid-anzum

The value of the radio fields keeps updating every time the form is saved. Needs to provide a different solution.

sapayth avatar Nov 17 '22 04:11 sapayth