Skip to main content

In workflow 5 is it possible to change a colour of a form or an element in a form?

Comments

6 comments

  • Stefan Schweigert

    Hello Marco,

     

    Many of the Workflow 5 form elements support Markdown however that does not include the ability to change colors, but if you are running the workflows in GVH then you are able to use custom CSS to have some control over the display. See this thread for more information: https://communities.geocortex.com/workflow/s/question/0D5f200004wvPzdCAE/markdown-in-expressions

     

    Thanks, Stefan

     

    0
  • Permanently deleted user

    Hi Stefan thank you for the response. From what I understand then only tags globally can be changed, ie change style for all <h1>. Where if I wanted to change a style for a specific <h1> element not all I cannot , as it seems the element id of the element does not seem to be the id of the HTML tag of the generated form. Is that correct?

    0
  • Stefan Schweigert

    Yes, that's correct. If this doesn't work for your use case, could you add a request to the Ideas section?

     

    Thanks, Stefan

    0
  • Permanently deleted user

    I have added this to the ideas section.

     

    Regards Marco

    0
  • Permanently deleted user

    Hi Marco,

     

    You actually may be able change the style for a specific h1 element. I haven't checked all form elements, but I did some quick testing with Text and TextBox elements. They each get a label in the viewer (see Chrome dev tools screenshot) that includes the id of the form element in the class name. So you can change the Element ID in the the workflow designer to something that will be unique across all your workflows on that viewer, and then make css selectors that will be specific to it

     GW5TextAndTextboxDesigner

    GW5UniqueElementCSS

     

     

     

    For example, the following css (added to your custom css file) will apply only to the h1 elements that come from form elements with the Element ID customTextName. You can see from above that it only gets applied to the first h1 inside my Text element, customTextName, and not to the second h1 in the TextBox element, TextBox1, description.

    .gcx-forms-customTextName h1 { font-weight: normal; color: blue; font-size: 0.5em; }

    This is still a bit of a messy workaround that I can't guarantee will always work in future versions, so I would encourage anyone that wants to use something like this to vote for the idea in the ideas section.

     

    Hope that helps!

    -Amanda

    0
  • Darryl Klassen

    can you not use the injectCSS now to do the same thing?

    0

Please sign in to leave a comment.