g_form.submitが動かない。

陳立東
Giga Expert

クライアントスクリプトのonSubmitにて、
クラシック環境のフォームの「g_form.submit()」は動かない。

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@陳立東 

this onSubmit is for catalog item?

Please share some more details, what are you trying to validate in onSubmit

Why not have the validation on change of your field/variable?

also check these links

How To: Async GlideAjax in an onSubmit script 

How to validate before onSubmit in Mobile/Service Portal 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

@Ankur Bawiskar 

Hi,Ankur Bawiskar😀
thank you so much.the problem is solved!

How to validate before onSubmit in Mobile/Service Portal 

var actionName = g_form.getActionName();
g_form.submit(actionName);

 

@陳立東 

Glad to help.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader