Ask a questionAsk a question
 

AnswerAdd a logo to browser based form

  • Thursday, July 02, 2009 1:47 PMGarry001 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is there a way to add a logo that is held within a sharepoint pic library to a browser based web form?

Answers

  • Sunday, July 05, 2009 7:54 AMSYM Wong-A-Ton Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    The article is fine regarding setting up a data retrieve connection into the library.
    But after that it starts going on about adding it to repeating table.

    All I want to do is select one image from the library, not loop through them all and add them to a repeating section.

    Does anyone have instructions on what to do after the data connection has been setup?

    You don't have to use a data connection, nor a repeating table, if you just want to use 1 image and the URL to the image will not change. I've simplified the code for you in this blog post
    S.Y.M. Wong-A-Ton, http://www.bizsupportonline.net (100+ InfoPath articles, tutorials, and solutions), InfoPath blog, InfoPath video tutorials

All Replies

  • Thursday, July 02, 2009 2:28 PMAnuma - GGKTechMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
  • Thursday, July 02, 2009 2:28 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Did you try already and it didn't work?  You can just insert it into your form template without it being hosted anywhere.  If you want it to be referencing something in a doc lib, then you'll have to create a data connection to that lib and display it in a picture control.  This is not the same as just making it part of your form template on the canvas, but if that's what you want to do...
    SharePoint Architect || My Blog
  • Thursday, July 02, 2009 3:02 PMGarry001 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The article is fine regarding setting up a data retrieve connection into the library.
    But after that it starts going on about adding it to repeating table.

    All I want to do is select one image from the library, not loop through them all and add them to a repeating section.

    Does anyone have instructions on what to do after the data connection has been setup?
  • Thursday, July 02, 2009 5:23 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Just select it, put it into a data element (using logic to pick that exact pic based on some metadata like filename) on your main data source, drag that element to the canvas, and make it a picture control. 
    SharePoint Architect || My Blog
  • Friday, July 03, 2009 8:47 AMGarry001 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Clayton,

    can you expand on this.

    1.The data connection has been setup.
    2. Insert rich text box into form and filter it (use the new data connection and filter on the name of the image)
    3. There is no option to make it a picture control as it is browser enabled.
  • Friday, July 03, 2009 8:52 AMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Oh yeah - browser form.  I'll have to look back at my form that does it to remember the settings.
    SharePoint Architect || My Blog
  • Sunday, July 05, 2009 7:54 AMSYM Wong-A-Ton Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    The article is fine regarding setting up a data retrieve connection into the library.
    But after that it starts going on about adding it to repeating table.

    All I want to do is select one image from the library, not loop through them all and add them to a repeating section.

    Does anyone have instructions on what to do after the data connection has been setup?

    You don't have to use a data connection, nor a repeating table, if you just want to use 1 image and the URL to the image will not change. I've simplified the code for you in this blog post
    S.Y.M. Wong-A-Ton, http://www.bizsupportonline.net (100+ InfoPath articles, tutorials, and solutions), InfoPath blog, InfoPath video tutorials
  • Friday, July 17, 2009 1:38 PMGarry001 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks for the blog, however when I try and paste this into the loading event after this....

     

    Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)

     

    ' Write your code here.

    I receive a number of errors including...

    Error 1 'XPathNavigator' is a type and cannot be used as an expression. C:\Documents and Settings\sharepoint\My Documents\InfoPath Projects\Template1\FormCode.vb 30 1 Template1

    Am I missing something simple?

  • Saturday, July 18, 2009 4:04 AMSYM Wong-A-Ton Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    It looks like you want to use Visual Basic code instead of C#? The code in the blog post is C#. So you can do one of two things:
    1. Set the programming language for your InfoPath form template to use C#.
    2. Convert the C# code to Visual Basic.

    I've updated the post with the Visual Basic version, if you want to go with the second option.

    S.Y.M. Wong-A-Ton, http://www.bizsupportonline.net (100+ InfoPath articles, tutorials, and solutions)