2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Intra-mart] Forma Tips

Last updated at Posted at 2019-11-06

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]

Tips01.png

[AFTER]

Tips02.png

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

Tips03.png

Hide the displayed error banner

Try the following function.

window.formaClearError();

Tips04.png

2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?