Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Before showing info-path form ,need to open model popup (i.e) confirmation Box , if user clicks ok then open infopath form in Edit mode,cancel then open infopath form in Read-only mode.

What I have tried:

used Messagebox.show(), while publishing its displaying error. Then written script in FormServer.aspx where SP.ClientContext but it's not finding, so please help me out from this.
Posted
Updated 21-Apr-16 18:54pm
Comments
Richard Deeming 22-Apr-16 7:16am    

1 solution

You can use confirm[^]

JavaScript
var flag = confirm('Do you want to open?');
      if (flag) {
          // your code for Yes|Ok
      }
      else {
          // Your code for No|Cancel
      }
 
Share this answer
 
Comments
Member 12477201 22-Apr-16 3:22am    
Hi Karthik, thank you for your replay. I have multipul infopath forms but i want only for particular form for that am trying to get sp.clientcontext in sharepoint, but it's not find in formserver.aspx page,this page present on 14 hive. if i place conformation it will show for all pages(i.e) Parent page for infopath forms.
Karthik_Mahalingam 22-Apr-16 4:14am    
then write a condition for that particular page name
Member 12477201 22-Apr-16 8:07am    
Hi Karthik, Thank you for your replay, Are you try this in SP2010 infopath form, we don't have pages specific pages for that.
Karthik_Mahalingam 22-Apr-16 9:39am    
I havent tried in Infopath dude. but there should be some workaround to fix this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900