Tips for IM-Forma Designer Optimization
I'd like to share some tips for IM-Forma Designer here.
This article may be updated occasionally.
Clear tables
Grid table has clearGridData().
https://dev.intra-mart.jp/cookbook150433/
But the table item has no function to do that.
Here's work around for that.
Try the following code
- In case of the table's ID is "tb1"
var args = {};
args.data = {};
args.data.tb1 = [];
args.data.tb1[0] = {};
formaItems.product_80_table.setItemData.tb1(args,{});
[BEFORE]
[AFTER]
Call Forma validation from client side JavaScript
Execute input validation immediately
Try the following function.
window.inputCheck('1',false,null,null);
The specification of the function as below.
*This is not official API but I just read and investigated the original source of Intra-mart.
They will not support this officially.
bool inputCheck (string inputCheck, bool temporaryFlag, string formId, string transitionOrderNo)
[Return]
bool
true:No error
false:Error
[Parameter]
inputCheck : string
'0' : Simple check works
Other than '0' : Full check works
temporaryFlag : bool
true : Behavior of temporary save
false : Normal behavior
formId : string / optional
Validation target formID
When undefined, current formId will be assigned
Hide the displayed error banner
Try the following function.
window.formaClearError();