Ad Schellevis 528474372b MVC - Boorgrid / form control minor additions.
o When row-id isn't specified on a "edit" target, use an empty string
o On form <input> tags support the "type_formatter" attribute, which defines the function to call in order to convert data before sending it to the server. This eases type conversions when needed (e.g. '1' --> 1 using a wrapper which uses parseInt())
o Add support for list type <select> content which offers a sorted list of key,value,selected attributes in addition to the current named array store.

Full example to offer properly typed integers to a backend:

    function form_format_integer(payload)
    {
        if (/^[+-]?[0-9]*$/.test(payload)) {
            return  parseInt(payload);
        } else {
            return payload;
        }
    }

<input type="text" type_formatter="form_format_integer" id="myform.quantity">

Sample data for list type <select> options:

"status":[{"key":null,"value":"-","selected":0},{"key":"PEN","value":"Pending","selected":1}]
2022-10-18 21:49:44 +02:00
..
2020-04-13 22:19:37 +02:00
2022-07-18 13:59:03 +02:00