Forms are displayed by default, but it is possible to restrict this display depending on certain assigned authorising data.
Two possibilities exist:
- either you don’t want to display the formula at all, so then return a
false
:function formulaire_nom_charger_dist() { $valeurs = array(); if (!autoriser("webmestre")) { return false; } return $valeurs; }
- or simple hide a part of the form (often the editable part) by using the "editable" variable, which is then handled in the form template:
function formulaire_nom_charger_dist() { $valeurs = array(); if (!autoriser("webmestre")) { $valeurs['editable'] = false; } return $valeurs; }