Write or Call JavaScript function in SharePoint InfoPath 2010 form

Dears,

I have a SharePoint 2010 Custom list and I used InfoPath 2010 to edit the form. Now I need to do some JavaScript in the form like when the user click Submit button then its need to check the validation by Using JavaScript code.

Is it possible to do it in InfoPath 2010?
mshajiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Connect With a Mentor Microsoft MVP ExcelCommented:
You can create a calculated value in Infopath that sums up all the fields. Or if you need the value to be a field, calculate its default value by adding up all the fields.

screenshot
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

why do you want to do this in JavaScript? Can you not use the InfoPath validation for the fields?

Please explain what you are trying to achieve.

cheers, teylyn
0
 
mshajiAuthor Commented:
Dear,

My real goal is not to validate a InfoPath form by using JavaScript instead I need to do some calculation through JavaScript.

Please see my attached image that will tell you what I need to achieve.

Thank you
js.jpg
0
All Courses

From novice to tech pro — start learning today.