From dbdce97dee556587c4ab0919d54371eeb5a92c3f Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 13 Dec 2024 08:42:29 -0700 Subject: [PATCH] More detail & additional examples for readonly vs disabled docs --- .../pages/getting-started/widgets.md | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/etemplate2/pages/getting-started/widgets.md b/doc/etemplate2/pages/getting-started/widgets.md index 70fd029f21..a19553d0f2 100644 --- a/doc/etemplate2/pages/getting-started/widgets.md +++ b/doc/etemplate2/pages/getting-started/widgets.md @@ -33,17 +33,25 @@ Widget behaviour is customised by setting attributes ### Disabled vs Readonly vs Hidden -Disabled widgets are fully shown, but in a way that indicates the value cannot be changed. +Disabled widgets are fully shown, but in a way that indicates the value cannot be changed. Use disabled to indicate that +at some point a user may be able to change the value, but not right now. The widget may be enabled via javascript. Readonly widgets are shown in a special way that displays a value, but is not interactive. Often we switch to a different component for faster performance, such as a simple -label. It is impossible to change the value of a readonly widget. +label. It is impossible to change the value of a readonly widget, and it cannot be made editable via javascript - the +page must be reloaded. -Hidden widgets are not visible. +Hidden widgets are not visible, but may be enabled via javascript. ```html:preview - - - - -``` \ No newline at end of file + + + + + +
Normal
Disabled
Readonly
Hidden
+``` + +When the page is submitted normal and hidden widgets will have their values returned and validated. Widgets that are +disabled when the page is submitted will not return their value. +Readonly widgets do not return a value. \ No newline at end of file