Stylesheet? CSS? - InfoPath Dev
in

InfoPath Dev

Stylesheet? CSS?

Last post 10-19-2005 11:17 PM by Patrick Halstead. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-11-2005 12:41 AM

    • qwer
    • Top 500 Contributor
    • Joined on 10-04-2005
    • Posts 49

    Stylesheet? CSS?

    Hi,

    My organisation is currently looking into using infopath to design its 200 odd forms and as a result we do not want to customise the style (eg, font size, table style, color schemes, etc) for each individual form. Is there a way to create a cascading style sheet much like a html webpage and refer to it through the view files? (since the view files in xsn have html in it!) Thank you
  • 10-11-2005 07:25 AM In reply to

    If you extract the files within your xsn, you have xsl files. These are the stylesheets that you are looking for. You can apply them to the xml (outside InfoPath) to generate html.

    Regards,

    Franck Dauché
  • 10-11-2005 05:46 PM In reply to

    • qwer
    • Top 500 Contributor
    • Joined on 10-04-2005
    • Posts 49
    Thanks franck,

    I didn't get what you mean by "You can apply them to the xml (outside InfoPath) to generate html." Can you clarify further?
    And can you tell me exactly how I would apply a stylesheet within the view.xsl files? And the format of the stylesheet?

    Suppose there are 3 forms:
    Leave/Absence form
    Travel form
    Salary Packaging form

    I am using the exact same style of fonts, font-size, font-face, color-scheme, table styles, for the 3 forms. Therefore I want to reference to a stylesheet inside the view.xsl of each form.

    So I was imaging a scenario where:
    Leave.xsn -> view.xsl
    travel.xsn -> view.xsl
    salary-pack.xsn -> view.xsl

    all referencing a stylesheet outside the form:
    style.css

    Does the html inside view.xsl file support stylesheet referencing? Or should I tackle this in another way?
    Thank you very much
  • 10-11-2005 07:59 PM In reply to

    Hi,

    Here is what I mean by applying xsl to xml to generate html:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipsdk/html/ipsdkUsingTheDownLevelTool_HV01081784.asp

    Your xsl files are the actual stylesheets.

    Regards,

    Franck Dauché
  • 10-12-2005 07:39 PM In reply to

    In the Tutorials section of this site look for the last listing called Style Sheets. That short tutorial will walk through adding your own CSS to InfoPath.

    I am currently doing a similar effort of formatting InfoPath with CSS. So far, I have found some oddities about how InfoPath handles CSS. You also should be careful because InfoPath will generate some style tags on its own.

    Dave
  • 10-19-2005 05:55 AM In reply to

    • qwer
    • Top 500 Contributor
    • Joined on 10-04-2005
    • Posts 49
    Thanks Dave for pointing out the tutorial.

    I have taken a look and realise you have to actually include your own css as a resource in order to use it. What I am actually looking to do is have the css file referenced external to the form template. I am trying to maintain one css file in a folder and have some 200 forms reference to that one single css file without adding it into each form template. Is this possible? anyone?
  • 10-19-2005 11:17 PM In reply to

    Using CSS is a cool way to change the view.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.