Showing posts with label InfoPath. Show all posts
Showing posts with label InfoPath. Show all posts

Sunday, June 5, 2011

InfoPath for the web

There are some constraints while designing InfoPath forms for the web.
First thing is that it does not support views!
If you wanna make a readonly view, then .... not possible ...
But, you can write a rule for every element by sing the username() function to see who has logged in
like
I wanted to disable a textbox when someone login, other than the administrator (the system account)
so, put a textbox on a form , in its properties window click on the fx button

Select username function as shown above and click ok for every window.
Once you have this text box, it can be used to validate every other control on the form
Suppose I have another txtbox called field2, and I need to enable it only if system logs in then,
Double click the textbox to see its properties (for IP 2010, add a new formatting rule)
then ....


In the display tab click conditional formatting to get the window shown above
Then select field1 (or whatever you called the username textbox) then select no equal to in the second and type system in the third, then check read-only.
Click ok for every window.

After publishing this form, you can only find field2 enabled when you login with the system account.

Another thing in web enabled forms is that they don’t allow a section within a section!
That’s one great feature in InfoPath, maybe you won't require it, but what if you want to hide a datepicker that is in a repeating table?
You need to use a section and put the formatting rules in there.
Like: http://www.infopathdev.com/blogs/shiraz/archive/2006/09/08/Hide-a-Date-Picker-Control.aspx
How can you show this web?
please, tell me if you know....

Sunday, May 15, 2011

send mail from InfoPath

To send mails from InfoPath ,a customized workflow should do

 see here first http://www.youtube.com/watch?v=Xe6b3zegpEU

The SharePoint designer can be used to create custom workflows, and hence send simple emails
The idea is to create a workflow that uses form library in the workflow to use at least one of its column fields (by column field I mean, one that is promoted to be shown on the SharePoint library) .

Once that is defined then use the actions in the workflow settings to send the mail.

Friday, May 6, 2011

InfoPath forms in webpages

On SharePoint 2007 it is possible to display an InfoPath form as a web page Provided the form is developed in web compatibility mode
and ofcourse there are the other settings, in SharePoint Administration that need to be taken care of.
Here is a checklist that helps a lot http://vspug.com/aziz/2008/01/27/a-checklist-for-enabling-browser-forms-with-forms-services-and-sharepoint-2007/ and to design a form so that it shows up fine on a web page this link helps http://blogs.technet.com/b/jessmeats/archive/2009/05/11/infopath-forms-within-sharepoint-pages.aspx
The thing is I had InfoPath 2010 and SharePoint 2007 to work with and also I was using some controls on a form that had to be 2010 (i mean InfoPath 2010) like the people picker
So I started off with the checklist;
I did the SharePoint 2007 administration part, i.e :

  • Go to Central Administration, then  choose the Application Management tab on the top of the page. Click on Configure InfoPath Forms Services in the InfoPath Forms Services section and check both "Allow users to browser-enable form templates" and "Render form templates that are browser-enabled by users" checkboxes, then OK this page.
Then
  • Open your SharePoint site, click on Site Actions -> Site Settings, select Site collection features under Site Collection Administration and activate InfoPath Forms Services support.
The next step is to design the form. Like I said I had InfoPath 2010, there is some difference in the way the check for compatibility for the web page is done,
Once the form is developed , you have to go to the file menu and click on the 'Design Checker'
then it checks wether the form is of to be opened in a web page.
While publishing the form, in step 3 , 'Enable this form to be filled out by using a browser' is to be checked and the last step remains the same i.e

  • At the end of the publishing wizard, select "Open this document
    library" and click on Close. This will open the document library in the
    browser. Click on Settings/Form Library Settings, then click on
    Advanced Settings and select the "Display as a Web page"
    option in the Browser-enabled Documents category. If you don't choose
    this option, the form will be opened in InfoPath if it's installed on
    the client. Otherwise, it's going to be opened in the browser.
If InfoPath is not installed, then the form opens in a browser, else, it opens using the InfoPath.