Way to disable <$checkbox> element?

72 views
Skip to first unread message

Cade Roux

unread,
Nov 12, 2020, 12:09:25 PM11/12/20
to TiddlyWiki
In HTML <input> there is a disabled attribute.  But this is not available in <$checkbox>  Would also like to be able to disable <$edit-text> as well.

Particular use case is that during my build cycle I am generating results into some TW in a "read-only" mode where the users cannot sign off on things and into some TW in a "test verification" mode where users do have to sign off on things, and I would like the layout to look similar to users and be able to simplify the code which generates the tiddlers/transcludes.  Currently, I replace those inputs with literal text, but would prefer to just be able to tag them with disabled so that all the existing TW bindings logic to tiddlers/fields would work.

I am considering just generating <input> elements which would look similar to the TW <$checkbox> elements but are disabled by attribute (and would lose their binding to the underlying tiddlers/fields, so that would have to be a literal as well).  Another option I am considering is layering a div over them so they cannot get the focus.

Thanks in advance,

Cade

PMario

unread,
Nov 12, 2020, 12:28:50 PM11/12/20
to TiddlyWiki
Hi,
This will be implemented in TW 5.1.23 ... the next version
-m

Eric Shulman

unread,
Nov 12, 2020, 12:40:14 PM11/12/20
to TiddlyWiki
On Thursday, November 12, 2020 at 9:28:50 AM UTC-8, PMario wrote:
This will be implemented in TW 5.1.23 ... the next version


A pass-thru of the "disabled" attribute should really be implemented for all input widgets, including edit fields (single-line and textarea), checkboxes, radiobuttons, and select lists.

In addition, it would be nice if the $timestamp="no" attribute was also available for use with all input widgets.  Just like <$action-setfield $timestamp="no" ...>, this attribute would NOT affect the TWCore refresh cycle or the "dirty" flag on tiddlers, but would simply prevent the tiddler's timestamp from being changed.

-e

Cade Roux

unread,
Nov 12, 2020, 12:55:08 PM11/12/20
to TiddlyWiki
That will be really excellent.

Thank you so much!

Cade

Reply all
Reply to author
Forward
0 new messages