Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1986
  • Last Modified:

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?
0
mshaji
Asked:
mshaji
  • 2
1 Solution
 
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
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now