pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
174 stars 125 forks source link

On dropdows question, option to show just last level #3305

Open SilvaFernando opened 1 year ago

SilvaFernando commented 1 year ago

Is your feature request related to a problem? Please describe. We testing FormCreator on GLPI 10.0.8 and in this version, we will have one feature that will show us just the category, entity last level o Assistance > Tickets, the following example: image

And we think, when creating a new forms if we use dropdown question > categories, if we had one field for the set to show only the last level: image

And in forms, we will have something like that: image

btry commented 1 year ago

Hi

If I understand well, you wan to truncate the complete name to show only the name of the leaf in the treeview ?

SilvaFernando commented 1 year ago

Hi @btry

Yes, something like this: image

Could you show just the last category in the treeview? What do you think about this? Is possible?

btry commented 1 year ago

Tree dropdowns presentation is handled by GLPI, not Formcreator. There is no option in GLPI to show the long or short name of an item when the dropdown is collapsed.

From what I see in your screenshot, having a long dropdown input is not a problem. If you designed a question with a small width then the plugin cannot do anything to adapt the width of selected item. You should allocate more width to your question and think how you could set shorter item names.

SilvaFernando commented 1 year ago

Our idea is not to decrease the width of the selected item, it is just to make it easier for the end user to use Formcreator.

If you think an end user needs to know all the tree views? I think it would look better and more professional no. Perhaps with this new feature of GLPI this adjustment will be possible

What you think?

btry commented 1 year ago

Hi

As Formreator uses GLPI's API to show dropdowns, this feature should be implemented in GLPI, to make it available globally.

The end user can know the complete tree because when he develops a tree dropdown the items are displayed either as a completename, either as items with groups and subgroups. Therefore, this would be a deep redesign of dropdown inputs. You may open an issue on GLPI to ask for a new option which allows to tune the collapsed tree dropdowns.

As this topic belongs to GLPI, I think we should close this issue.

SilvaFernando commented 1 year ago

Hi @btry.

I tried in the GLPI repository and they asked us to open an issue in the Formcreator repository:

btry commented 1 year ago

Hi

I reviewed the PR for GLPI. It adds a user preference to display the short name of a tree dropdown item, but only in a list of items. For example the settings takes effect in list of tickets, when you show itil category or entity columns.

I maintain my point of view that your request should be implemented in GLPI.