Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
This tutorial cater for use cases that requires a highly customized spreadsheet.
The Spreadsheet form element uses the Handsontable library, specifically version 6.2.2 for Joget Workflow V6.
There are a wealth of plugins and APIs in the library documentation to change the cell appearance, cell selection, dynamic data, dynamic validation, and much more.
Figure 1 : Spreadsheet Form Element Properties - UI - Custom Settings
Copy & paste this code snippet into Custom Settings.
{ selectionMode: 'single' }
First, use a Custom HTML form element to write a simple class style. Do use the !important notation only if the style is being overridden.
<style> .invalidCellCustom { background:pink !important; } </style>
Then, copy & paste this code snippet into Custom Settings.
{ invalidCellClassName: 'invalidCellCustom' }
First, copy & paste this code snippet into Custom Settings.
{ "afterInit" : function() { var hot = this; $(hot.rootElement).data("hot", hot); } }
Then, use a Custom HTML form element to get the 'hot' instance. After that, you are able to perform core functions on your specified spreadsheet element.
<script> $(function(){ var hot = FormUtil.getField("_yourSpreadsheetFormElementIdHere_").data("hot"); //console.log(hot.getSettings()); //hot.setDataAtRowProp(0, '_yourcellColumnIdHere_', '_myNewValue_'); }); </script>