specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
65 stars 36 forks source link

Visual form editor does not show correct default picklist value #4993

Open lexiclevenger opened 4 months ago

lexiclevenger commented 4 months ago

Describe the bug When adding a default value to a picklist using the visual editor, an invalid value like this is shown instead of the value you added:

Screenshot 2024-06-07 at 11 30 46 AM

Additionally, if a default value is removed from the xml, the visual editor does not update. If the form definition is changed in one of these ways, the change cannot be seen until either the visual editor or the form are reopened.

To Reproduce Steps to reproduce the behavior:

  1. Go to a form definition with a picklist
  2. Add a valid default picklist value to the field using default="value" like this:
    <cell type="label" labelfor="7"/>
    <cell type="field" id="7" name="prepType" uitype="combobox" picklist="PrepType" default="Pinned"/>
  3. See that the picklist in the visual editor shows an invalid value as the default

Expected behavior If a value added to the xml is valid for that picklist, the visual editor should update to show the correct value.

Screenshots

https://github.com/specify/specify7/assets/164079735/1332a9af-7371-497e-9bc0-16cacefe3954

Specify 7 System Information - 2024-06-07T16_52_51.868Z.txt

Please, also fill out the following information manually:

emenslin commented 3 months ago

Can recreate in edge (7.9.6)