Greetings to all from a TW newcomer,
I’ve created in my TW Desktop the following edit-text widget in TW5, of type="number"
, which is connected to a field of the currentTiddler:
<$edit-text field="testField" tag="input" type="number" inputActions=<<boundValue lowerBound:0 upperBound:1000>> />
It includes a macro for the inputActions
called boundValue
. Given the current absence of min
and max
parameters for the number-type of an edit-text
(according to my searches), this macro checks the actionValue
that is typed in the text box’s edit field, and it sets the value of the tiddler’s field to the upper (lower) boundary if the inserted value is greater (less) than the respective boundary (for brevity’s sake, I’m not including the macro, but let me know if you need to see it).
What I can’t figure out how to do, if it is possible, is to automatically update the edit field’s value that is displayed in the browser to the respective boundary if it has been set by the inputActions
. For example, let’s say that lowerBound:0
and upperBound:1000
, and user dials “1200”, then the tiddler’s field will still get the upperBound
's value of “1000”, but the edit field is still displays “1200”. I would like to have the edit field update automatically to “1000” (probably as part of the called inputActions
macro?).
Any ideas how to achieve this? I’ve experimented and searched for different things, but still not sure if actionValue
(as a system variable, I guess?), can be set programatically, and even if this will appear in the text box’s edit field.