InfoPath, SharePoint

Embeding Image In InfoPath 2010

There’s a requirement where I have to embed 3rd party Digital Signature inside the form

It turns out in InfoPath 2010 we can directly embed base64 encoded image into the Picture Control. (wow.. no more InfoPath 2007 nightmare huh?)

To test it, I create a Picture and a Button, the button will have rule to inject the image data

1. Insert the Picture Control

It will ask you whether you want to insert as a link or embedded in the form XML. For this demo I use Included in the form (for as a link, you just have to change the Picture Value to the appropriate URL)

2. Set the picture to read-only (I want it to be injected by button event, so the user cannot change the picture)

3. prepare the image, to convert this image to base64 string.. I use this

4. Insert the image base64 string as a field value

5. Test the form

Well the basic ideas of this experiment are; we can replace the field-value by a HTTP call to a page/script/service that generate image or signature in base64 encoded string (or it’s direct URL will do)

I haven’t had the time to publish it to a Form Service, but the Compatibility check for browser mode indicated no Error.

Possible implementation:

  • Captcha in InfoPath?
  • 3rd Party Digital Signature
  • Generated Image based on user input (chart image?

And that concludes the experiment for today






7 thoughts on “Embeding Image In InfoPath 2010

    1. I guess that is possible, you have to create a web service method to generate a captcha value that is stored in session and also base64 captcha image and feed it to the Picture Control,

      when the form is submitted, there’s another web service method to check whether the user inputted captcha is equal to the one we store in session, if it’s not then stop the form submission (using form rule)

      What do you think?

      1. Thanks for the reply. Any webservice that you can suggest to create CAPTCHA from infopath forms?..looked at some however they all expect some kind of javascript coding.

  1. @Vee:
    sorry didn’t really have any recommendation of any `existing` web-service who can do that.

    I presume it should be easy to create a custom one.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s