Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Damgaard Mortensen 719 posts 1207 karma points
    May 10, 2014 @ 18:03
    Bo Damgaard Mortensen
    0

    Looking for advice/best practices for adding header/subheader to forms

    Hi all,

    I'm currently developing a v7 site with the latest version of Contour installed. The design of the site dictates, that a form can have a header and a subheader.

    Normally, I'd use the Page title and Fieldsets legend for this, but in this case, the headers and subheader can also contain styling (namely red text and bold text) and the editor should be able to control this styling without writing any kind of HTML.

    An example of a header/subheader could be like this:

    enter image description here

    Where "always welcome" is set to bold and red.

    How exactly would you go about this? :-)

    Any input is greatly appreciated!

    Thanks in advance.

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    May 10, 2014 @ 18:49
    Chriztian Steinmeier
    0

    Hi Bo,

    Please for the love of God, don't give them a button to make it red.

    OK, jokes aside, I'd probably do this with Markdown without telling them that it's Markdown, of course :-)

    They want to be able to empathize something in the header, so I'd go for letting them type this: "You are *always welcome* to write us" - and then use a Markdown library to parse that header before outputting it.

    I've done that a couple of times, and I always succeeded in explaning the difference between wanting "to have something bold and red" and wanting "to empathize something", and having the current stylesheet render the empathized stuff in bold and red :)

    (We all know that before the actual launch, someone higher-ranking has seen the site and demanded that "the bold red stuff needs to be yellow with an overline"...)

    /Chriztian

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    May 10, 2014 @ 20:02
    Bo Damgaard Mortensen
    0

    Hiya Chriztian,

    Thanks a lot for chimin' in! :-)

    I was definitely considering the approach where you could specify certain "tags" to make it bold and red. I was thinking along the lines of <bold>something</bold> and <red>something</red>, but that would be too much "code" for them to write. I didn't think of making it simpler with *'s and #'s, i.e. Good point! :-)

    I will absolutely output css classes for this when the person in charge want the red to be blue instead.

    Thanks again!

Please Sign in or register to post replies

Write your reply to:

Draft