Bug #22047
champs liste : laisser vide quand optionnel (?)
Statut:
Nouveau
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
21 février 2018
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Description
Even more importantly though, users scan forms looking for empty fields. As people, we don’t methodically work through all the field names, picking them out from all the other clutter on the page. We take the easy lazy route. Which fields are blank?
— https://uxdesign.cc/dont-default-to-please-select-in-drop-downs-only-use-defaults-when-applicable-to-most-users-c051ff0c65bc
côté code ça serait genre :
+++ b/wcs/qommon/templates/qommon/forms/widgets/select.html @@ -4,6 +4,8 @@ {% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}"{% endfor %}> {% if not widget.separate_hint and widget.hint %} <option value="">{{ widget.hint }}</option> + {% elif not widget.required %} + <option></option> {% endif %} {% for option in widget.get_options %} <option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}>{{ option.description }}</option>
Demandes liées
Historique
Mis à jour par Thomas Noël il y a environ 6 ans
Ouaip, j'aime bien. Dommage qu'on ai pas eu cette idée lors du bricolage par l'utilisation du "hint"... (ma faute)
Ack, à pousser un lundi d'après release ?
Mis à jour par Thomas Noël il y a environ 6 ans
- Lié à Development #22048: champs liste : ne plus mettre la remarque comme premier élément (?) ajouté
Mis à jour par Frédéric Péters il y a environ 2 ans
- Lié à Autre #61269: Avoir toujours le choix vide dans les listes ajouté