I understand there would be value allowing the edit-text widget to pass through the additional parameters that can be applied to type=“number”,
<$edit-text type=number field=number-field/>
Something similar could be argued for any or all html input types below, but it seems to me in this case rather than continue to modify the edit-text widget we may be able to develop an <$input
widget and provide equivalent to the onclick trigger and javascript to service all inputs, adjusting to accommodate tiddlywiki’s mechanisms. These can be summarised as;
- Setting a tiddler and/or field to the value(s)
- Reading the current value from a tiddler and/or field
- Triggering appropriate actions
- Possibly providing some “canned” actions.
- Ideally but unlikely, being able to set a variable or other that can be used at least inside the input widget.
TiddlyWiki 5.3.x
- I believe with TW 5.3.x there may be more opportunities with a generic input widget to then spawn new widgets that handle specific input types, and subsequently “call” the input widget.
- There is substantial features and checking already available in HTML that if we can find a way to do this, we can generate low code solutions, perhaps even rewrite some existing widgets.
However, much can already be done.
- Please note with the current edit-text widget you can partially leverage these using the type parameter, then using the inputActions and the variable
actionValue
, you could trigger a data evaluation process, and modify the input field accordingly, to generate the equivalent of min
, max
if not step, however a step fuction can be emulated with buttons/listops/filter maths.
- Basically I would argue everything you could Imagin is already possible, its just that it is just more complex than it needs to be.
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">
If you paste this into a tiddler you will see the html; is generated the only problem is getting the input into tiddlers and fields.
- Try this in the edit-text widget and many work well enough, except for handing “some” of the input attributes
- It does not help, that we do not document the working cases in TiddlyWiki.com
In html the typical approach after accepting inputs, is the submission of a form. The values entered are I understand stored in the DOM (Document Object Model), but since the DOM is how tiddlywiki’s underlying mechanism works, never the two will communicate.
- It seems to my years of IT Experience, but admittedly limited internet developer skills, that a way to process the html form with a tiddlywiki action like the HTML submit we could perform an action to populate tiddlywiki fields or variables from this overlaying DOM.