Images are not exported to MHT correctly when set to read only

B

Ben walters

Hey Guys,
I'm developing an infopath form, this form has a bunch of fields etc plus
logo in the top left hand corner. This is an image control that is locked out
from the user as we dont' want them to be able to change it. However when I
export to MHT this image is not included in the export. If I set the image to
be updateable it comes through in the export fine.
Personally to me this looks like a bug with infopath, is there a way around
this so that I can still lock the user out attaching a new image but still
have it display in the mht export???
 
P

Patrick Halstead [InfoPath MVP]

Hi Ben,
Cool bug! I don't remember this bug (and I was dev lead for the feature!).
It's possible you have found a new bug. Anyway, one way to work around is to
use a rich text control instead of the picture control. This has some
drawbacks (sizing of image) but rich text controls do support images and it
looks like this bug doesn't exist for them. In other words, have people
insert the image into the rich text control and then set the control to
read-only for those users who are only viewing. They can export to Web and
they will see the image. It might also be possible to spelunker the XSL to
find out exactly what nastiness is causing the Export to Web to fail and
work around it. But, if rich text control works, that might be a suitable
solution for now.
Good luck!
Patrick Halstead
http://www.autonomysystems.com/
 
B

Ben walters

Hey Patrick,
Nice to know I'm keeping you on your toes (guess thats the plus of being a
tester before being a developer) anyway I did try the text box approach
however after setting a default image for the text box it didn't seem to
display when the form was loaded. I have since found a work around and that
is to use an image control, tick the check box that says "Allow users to
insert pictures" then set the image control to be disabled via conditional
formatting. i.e. if Image1 is not blank then disable control. upon intial
testing of this it all seems to work pretty well.

thanks for your response though I have to admit I didn't expect to get such
speedy feedback

Cheers
Ben
 
P

Patrick Halstead [InfoPath MVP]

Hi Ben,
Neat workaround. I didn't realize you were setting a default image. We
should post your trick in a Tips and Tricks repository. In fact, I think I
will start a forum category on Tips and Tricks on our website and make yours
the inaugural post.... :) Do you mind?
Regards,
Patrick
http://www.infopathdev.com/forums
 
B

Ben walters

Hey Patrick
Sounds good to me :eek:)

Patrick Halstead said:
Hi Ben,
Neat workaround. I didn't realize you were setting a default image. We
should post your trick in a Tips and Tricks repository. In fact, I think I
will start a forum category on Tips and Tricks on our website and make yours
the inaugural post.... :) Do you mind?
Regards,
Patrick
http://www.infopathdev.com/forums
 

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