Inject javascript to Infopath form - sharepoint

We use Infopath 2007 + Sharepoint 2007 and need to inject some javascript to infopath form. I know that infopath form can be hosted on the aspx page using XmlFormControl. But this solution doesn't suit us =(. Is there any workaround?

InfoPath Form Services won't let you publish an InfoPath form with JavaScript. If you really need to use JavaScript for a rich client experience, you may have luck loading your form in a XmlFormControl as you mentioned, then loading your js library on the page along side it, and binding to dom elements. You won't get any design time support this way but it may work.
Generally speaking, you need to stick to rules and managed code with IPFS.

Maybe you can write an InfoPath add-in to inject javascript codes.
InfoJet Service - InfoPath Web Forms Engine
http://www.infojetsoft.com

Related

Best strategy to phase out InfoPath forms in SharePoint

My client uses InfoPath form libraries. They want to phase out the use of InfoPath all together and replace it some alternative.
My idea is to implement custom forms for the same and host it within SharePoint, so that the users can have a web based alternative, in place of client application such InfoPath Form Filler.
What can be the best strategy to achieve this?
If you're sure they want to use browser forms, I'd start by investigating Forms9 and Nintex. I think Qdabra did a webinar on getting your data out of your existing InfoPath forms.
However it might be smart not to rush, since InfoPath is not disappearing for several years. New options are in the works. Microsoft is working on native solutions such as Forms On SharePoint Lists that might meet your client's needs in a year or two. Also Formotus (my company) has app-based form filling solutions and has announced the intent to continue superseding InfoPath, so the right solution may come from there too.
Recommended reading: My blog series on InfoPath Alternatives
http://www.formotus.com/category/infopath-alternatives

How does Infopath forms routing work (ie an Expense Approval form)? Is a PKI required?

I don't have an understanding on how the whole InfoPath product works. I know it can save data to Sharepoint. But here are a few bits of information I'm confused about:
If someone saves an Infopath form to SPS, is the entire form saved, or just the data?
How would an approval scenario work?
My employer wants to use as little code as possible for each form. They are currently using PKI that requires the end user to submit the form (to Access DB), sign the form, then save the form. I know this isn't ideal, but I don't have enough background to tell them what to do instead.
You could create Infopath form templates (*.xsn files) using the InfoPath 2007 form designer which is both the layout and logic (code) for the form. These forms could then be deployed into a site on a SharePoint server (that has InfoPath Form Services, which is a component of Microsoft Office SharePoint Server (MOSS) 2007).
After all of the above, any user that has access to the aforementioned SharePoint site could fill the form and submit it. And typically the filled-in data would be saved as an xml file into an InfoPath Form library on the same SharePoint site.
I didn't understand what you mean by PKI. Hope that helps...
InfoPath Form Services on MSDN
You can digitally sign your forms, section by section. This capability is built-in
Regarding showing/hiding field specific to different security roles - you can use views in InfoPath, each view targeting a different person

What exactly can "Full Control" with SharePoint Designer accomplish?

I've been brought in as an intern to develop a SharePoint site. My team won't authorize the budget for Visual Studio and I don't have physical or remote access to the SharePoint server (running Windows SharePoint Services 3.0 a.k.a. WSS) on the back-end.
So what exactly can I do? I'm familiar with web technologies like PHP, JavaScript, HTML, and CSS. However, since the environment is SharePoint, I'm stumped trying to figure out how much control I have with Microsoft's definition of "Full Control".
If I can write some C#, I'm pretty sure that would be sufficient, but as I said no Visual Studio for me.
Any good ideas of features that people will use on a site built with the limited functionality of WSS and SharePoint Designer with "Full Control"? Can I somehow manipulate the default Web Parts into something cool or useful? Are there Ajax tricks I can do to accomplish something on the back-end?
Thanks in advance, I'm new to StackOverflow and eager to get involved here!
You can actually accomplish a LOT in SharePoint outside of a custom .NET solution. Some recommended learnings are:
JavaScript/jQuery - Know how to interface with a WebService using jQuery. SharePoint exposes a number of very useful WebServices in the /_vti_bin directory. Click here for a list: http://msdn.microsoft.com/en-us/library/ms479390.aspx. For example, I recently built a scrolling slide-show webpart entirely using jQuery and SharePoint's built-in webservices that pulls from a provided picture library.
DataForm Web Parts. Do some searching around on what these are and how they work in SharePoint. The tl;dr of these is that they're databound webparts that are bound to an SPDataSource and then rendered using XSLT to format the bound data. You can work with these in SharePoint designer, completely through the markup of your aspx page.
Do some searching on "customizing sharepoint list forms." The NewForm, DispForm and EditForm of any list or library can be customized to have behaviour or content added to them.
Those are just off the very top of my head...
EDIT:
I forgot to also mention http://www.muhimbi.com/Products/SharePoint-Infuser-%28Free%29.aspx
I've been meaning to check this out, since the concept is sound. I haven't tried it out myself but it will save you a lot of hassle when it comes to adding custom script that encompasses your entire site.

how to render infopath webpage in sharepoint

how to render infopath webpage in sharepoint.
I have designed the MS office infopath form, & stored in the my sharepoint site document library, (in fact i created new one). But when i want to open that form it direct redirect in MS office infopath with running form. Which i don't want. I want to open form in sharepoint site. How it is possible . Please guide me ....
The ability to display InfoPath natively in a browser is part of InfoPath Forms Services, which is only provided bundled with MOSS Enterprise, not MOSS Standard or the free WSS.
Forms Server is available as a separate license altogether as well, but there's no other mechanism to display InfoPath forms in a browser without rolling your own solution, which would be a rather complex undertaking.
Did you publish the form to a forms library or did you simply upload it? In order for Forms Services to render a form it must be published using InfoPath's File>>Publish command.

Workflow and Infopath

Do I need Infopath installed locally to edit forms in a workflow for sharepoint?
Authoring InfoPath forms
If a person needs to create a new Infopath form or needs to change the layout of the existing form one needs to use InfoPath client.
The form layout and data structure is saved as XML so one might try to edit it but I would recommend you not to mess with it.
Filling forms
In order to fill the forms there are two scenarios:
User fills a form via web browser (InfoPath client is not required)
User fills a form via InfoPath client
The first option does sound interesting but limitations do apply:
You must purchase MOSS Enterprise license (for difference between SharePoint editions check this: overview or details here). There is an option to purchase a dedicated Forms Server.
Infopath as web form does not support all the features as the Infopath client form
Although web forms sound very appealing, my experience taught me that most important features are not available in the web edition. Check here for detailed list.
Default workflow forms
Your original question is not clear, but if you are talking about editing default workflow forms like Approval workflow form (which is InfoPath) there is no easy way to do it.
You won't need InfoPath as long as your forms are browser-enabled and you are running on MOSS (to use the InfoPath Forms Services).
If you are on plain WSS, then you will need InfoPath installed to fill out forms.
I don't think this is necessary if the forms are stored in a SharePoint document library.
Do you mean to edit individual forms, or to design a form?
Yes you do, it will be rendered as HTML in the site, but to edit it, you need a copy of infopath.
If you are just a user, and it's a web form, then you do not need to install the software, Otherwise, you should. It depends on what form the InfoPath display.
If you are a developer, you must install it locally so as to edit the template and deploy it.

Resources