diff --git a/examples/official-site/sqlpage/migrations/01_documentation.sql b/examples/official-site/sqlpage/migrations/01_documentation.sql index a3876da0..5ce9d6b9 100644 --- a/examples/official-site/sqlpage/migrations/01_documentation.sql +++ b/examples/official-site/sqlpage/migrations/01_documentation.sql @@ -237,7 +237,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S ('class', 'A CSS class to apply to the form element.', 'TEXT', FALSE, TRUE), ('prefix_icon','Icon to display on the left side of the input field, on the same line.','ICON',FALSE,TRUE), ('prefix','Text to display on the left side of the input field, on the same line.','TEXT',FALSE,TRUE), - ('suffix','Short text to display after th input, on the same line. Useful to add units or a currency symbol to an input.','TEXT',FALSE,TRUE) + ('suffix','Short text to display after th input, on the same line. Useful to add units or a currency symbol to an input.','TEXT',FALSE,TRUE), + ('id','A unique identifier for the input, which can then be used to select and manage the field with Javascript code. Usefull for advanced using as setting client side event listeners, interactive control of input field (disabled, visibility, read only, e.g.) and AJAX requests.','TEXT',FALSE,TRUE) ) x; INSERT INTO example(component, description, properties) VALUES ( diff --git a/examples/official-site/sqlpage/migrations/36_probe.sql b/examples/official-site/sqlpage/migrations/36_probe.sql new file mode 100644 index 00000000..8fd427e1 --- /dev/null +++ b/examples/official-site/sqlpage/migrations/36_probe.sql @@ -0,0 +1,54 @@ +-- Documentation for the probe component +INSERT INTO component (name, description, icon, introduced_in_version) VALUES ( + 'probe', + 'A debug component that displays a value (constant, variable, parameter value, result of an SQL function, e.g.). Usefull to validate data flow or function behaviour. Each value (except NULL value) is surrounded by double quotes and followed by datatype (number, string, boolean, e.g.).', + 'microscope', + '0.20.0' +); + +INSERT INTO parameter (component,name,description,type,top_level,optional) VALUES ( + 'probe', + 'name', + 'Value identifier (used to display the probe result).', + 'TEXT', + TRUE, + FALSE +),( + 'probe', + 'contents', + 'A value to analyze by the probe.', + 'VARIANT', + TRUE, + FALSE +); + +-- Insert example(s) for the component +INSERT INTO example(component, description, properties) VALUES ( + 'probe', + 'Analyse a number.', + JSON( + '[ + {"component":"probe","name":"myValue","contents":42} + ]' + ) +); + +INSERT INTO example(component, description, properties) VALUES ( + 'probe', + 'Analyse a string.', + JSON( + '[ + {"component":"probe","name":"myString","contents": "Hello world! "} + ]' + ) +); + +INSERT INTO example(component, description, properties) VALUES ( + 'probe', + 'Analyse a NULL value.', + JSON( + '[ + {"component":"probe","name":"myVar","contents": null} + ]' + ) +); \ No newline at end of file diff --git a/sqlpage/templates/form.handlebars b/sqlpage/templates/form.handlebars index 74db9fd9..db1fcdf5 100644 --- a/sqlpage/templates/form.handlebars +++ b/sqlpage/templates/form.handlebars @@ -16,7 +16,7 @@ {{#if (or (eq type "radio") (eq type "checkbox"))}}