Change
Improve form scripting
Issue description
The current solution is difficult since it is hard and verbose to write simply functionality. In addition there are some very specific issues which need to be addressed so that coding becomes easier and more enjoyable.
Developer comments
The specific issues are:
1) Most JavaScript form code is triggered by validation by using onValidate. This function should have an event parameter passing the old value and the new value.
2) It should be possible to set a value only if the form input is empty and/or to require confirmation before changing a value: setIfNull.
The second point above becomes less important if the code clears up. Plus it is easy to avoid, e.g.
[% if (form.weight.value === null) {
form.weight.value = newWeight;
}%]
This is cleaned up and many features are now realized.
* It is possible to validate information across form boundaries. The main form in the browser window has child forms, often row forms. It is now possible to perform validation across forms, e.g. the sum of all input fields in the rows may not exceed an upper limit given in the main form.
* Everything can now be formulated pretty much straight forward, without giving it too much thought.
* The code looks much cleaner.
It remains to be [https://www.topincs.com/manual/formscripting, documented].
|
Work sessions8
| Start |
2026-02-18T06:37:29
|
| End |
2026-02-18T10:27:33
|
| Participant |
Robert Cerny
|
| Start |
2026-02-18T13:00:00
|
| End |
2026-02-18T15:00:00
|
| Participant |
Robert Cerny
|
| Start |
2026-02-18T15:28:55
|
| End |
2026-02-18T18:10:08
|
| Participant |
Robert Cerny
|
| Start |
2026-02-20T07:41:47
|
| End |
2026-02-20T18:03:12
|
| Participant |
Robert Cerny
|
| Start |
2026-02-21T12:25:56
|
| End |
2026-02-21T16:13:44
|
| Participant |
Robert Cerny
|
| Start |
2026-02-22T10:00:00
|
| End |
2026-02-22T11:20:30
|
| Participant |
Robert Cerny
|
| Start |
2026-03-03T07:53:54
|
| End |
2026-03-03T10:13:34
|
| Participant |
Robert Cerny
|
| Start |
2026-03-04T08:23:37
|
| End |
2026-03-04T09:13:07
|
| Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.