Client script on Web Forms

Hi All,

I need hep in writting client script on web form.
I am not geeting exact syntax and events .
Kindly help me out .
sharing any code snippet would be so helpful.


Can you elaborate what you are trying to achieve?.

Hi ,
I have created one web form now i want to perform some calculation when this form will get save.

This like will help

and the trigger you can use is validate

I want to achieve it through client side only.
Can you share any of your code snippet ?

frappe.ui.form.on(‘POS Import’, {
validate:function (frm) {
//Do something here
var result = 1+1

“POS Import” is the name of Doctype

This is not working on client script of web form.

@Taniyavish - take a look at Customizing Web Forms