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?
Inject javascript to Infopath form
Asked Answered
We even tried to write javascript directly to view(.xsl) file. But after rendering xsn to html all our "extra" javascipt was removed. –
Eury
Probably not going to happen (at least without extreme effort). What are you trying to accomplish - perhaps we can find another way to do it. Some type of validation, perhaps? –
Ovine
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
I suppose such an add-in will be only able to add javascript to the view. But this script will be skipped by a render (Infopath Form Services are a render in my case). Am I right? BTW development of an add-in is a challenge. I can do any modification of the xsn file if it helps... –
Eury
© 2022 - 2024 — McMap. All rights reserved.