jegelstaff / formulize

Unified data management. One system to handle all data entry, collection, and reporting, across all your unique workflows. Simplify processes. Make people happy.
https://www.formulize.org
GNU General Public License v2.0
27 stars 14 forks source link

Overhaul of multiselect autocompletes, so they trigger conditions and behave better #473

Closed jegelstaff closed 5 months ago

jegelstaff commented 5 months ago

Several things updated...

  1. Linked elements that refer to the same form (self reference) will exclude their own entry by default. ie: Activity Log has a linked list of all the Activity Log entries. When filling in the form, the entry you're editing will not be an option in the list. But if you want it to be, you can allow self-reference. This is new behaviour that defaults to on (absence of a saved setting means 'on'). So if people want to preserve historical behaviour they have to specifically go set it to off.
  2. We no longer care about the max width of values in the autocompletes, because the CSS styling takes care of the element size for us (what a throwback!)
  3. Autocompletes will exclude the currently selected values from the suggestions, so you can't pick something twice!
  4. Multiselect autocompletes will now trigger conditions properly (they weren't sending their selections to the server before, and weren't even triggering the change event)
  5. The removal of multiselect autocomplete selections is now encapsulated in a JS function, which can be referenced in userland code if you want to provide some other interface to show/delete the selections
  6. Also, touchups to the text for global selection restrictions in the admin UI