Adding a custom save button

P

Pedro Innecco

Hi all,

I have designed a form for submitting expenses to a form library in MOSS
2007, which is to be filled-in using the Forms Services.

In order to submit the form, the user must click on a custom SUBMIT button I
have added into the form, which will submit the form using a custom
nomenclature for the filename.

Because of such nomenclature, I removed pretty much all buttons from the
Infopath Form Services. In particular, so users can't click on SAVE and
add-in any name they want (thus breaking the custom nomenclature).

However, I would like users to be able to GO BACK into the form and perform
changes. And since they don't have a SAVE button, they simply can't save
changes!

Is there a solution for my case available? Any thoughts?

I was wondering if I then could add a control for a standard command button
(that is, not a button on the Form Services toolbar), and allow users to
click on such button to save. I would then use hidden data field to make the
SAVE button visible or not.

Thanks a lot in advance,
Pedro
 
S

Sheetal D [MSFT]

Hi Pedro,

The approach that you are thinking is the correct one...have a custom
button in the form for saving. Add a dummy textbox control to the form
which is hidden always...When users click the SUBMIT button you can set
some value to that hidden dummy textbox control (say "1"). Based on this
value, you can either hide/unhide the Save button.

How this will work?
Initially when the user opens the form for filling it out the SAVE button
is hidden. Only when he clicks on the SUBMIT button, we set the value of
dummy textbox control to "1" and the form closes. Second time, user opens
the form, he will see the SAVE button enabled. He can modify the form, make
the required changes and then save it.

For this to work, we have to make the InfoPath form template fully trusted.
If your InfoPath form template is not fully trusted then here is some
information on fully trusting InfoPath forms which might be helpful:

Following are the different options/methods for getting an InfoPath form
fully trusted.
(1) In order to create an msi file please refer the following article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipsdk/html/
ipsdkUnderstandingFullyTrustedForms_HV01073332.asp

(2) For digitally signing the form:
Add “Full Trust” and “Sign the XSN” with a digital certificate
A. From the Tools menu, choose Form Options
B. Select the Security Tab
C. Uncheck the option “Automatically determine security level...” and
enable the “Full Trust” option
D. Enable the “Sign this form” option and either select or create a digital
certificate. **
** If you choose to “Create” a certificate, this creates a “self-cert”
which is only valid on the machine in which it was created.
NOTE: We need "Code Signing Certificate" for fully trusting the InfoPath
form with certificate.

Refer the following articles to know more on getting a certificate from
trusted authority so that it will be valid on all the machines within the
intranet:
(a) Cryptography for Network and Information Security
http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/
en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en
-us/distrib/dsch_key_msjr.asp

(b) Setting up a Certificate Authority
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html
/29ff74a2-249a-4ecf-8a2a-ff0ba572e4db.asp

(c) Building an Enterprise Root Certification Authority in Small and Medium
Businesses
http://www.microsoft.com/technet/security/prodtech/windowsserver2003/build_e
nt_root_ca.mspx

----------------------------------------------------------------------
Best Regards,
Sheetal, MCSD.NET
Blog: http://sheetald.spaces.live.com

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top