Change field properties

6 posts by 2 authors in: Forums > CMS Builder
Last Post: April 25, 2022   (RSS)

By andreasml - April 22, 2022 - edited: April 22, 2022

Hi,

Is there a way to change a field's properties in the CMSB? For example, I would like to change the content of a specific field to be displayed in bold text type and in red colour or possibly in a different font type or size. Would it be possible?

Thanks in advance,

Andreas Lazaris

By daniel - April 22, 2022

Hi Andreas,

There isn't anything built-in to the CMS that allows this, but it should be relatively simple to set something up. My first choice would be to see if a WYSIWYG field would work since that automatically includes formatting tools, but if not, I would set up additional checkbox/dropdown fields to control the formatting, and then implement those in the HTML on the page. Depending on the type of section/content, you could either set up those fields in the record itself, or create a new "Style Settings" section to control it.

Let me know if that helps, or if you have any other questions!

Thanks,

Daniel
Technical Lead
interactivetools.com

By andreasml - April 24, 2022

Hi Daniel

Thank you for your response. WUSIWUG field is not an option. Let's suppose we are talking about a textfield field where I would like the value to be in bold type of letters. Could you give me a hint to start?

Regards, 

Andreas

By andreasml - April 25, 2022

Hi Daniel,

Correct. I am tallking about having the field values display as bold in the CMSB admin. 

Andreas

By daniel - April 25, 2022

Hi Andreas,

Apologies - I had misunderstood before. There isn't any built-in way to accomplish this, but it can be generally accomplished with CMSB's theming capability. Under the branding menu (/cmsb/admin.php?menu=admin&action=branding) it's possible to choose a theme CSS file for the admin. Custom themes can be created by adding a CSS file that starts with "theme_" to the "/cmsb/3rdParty/clipone/css/" directory.

Once you have created a custom theme, you can modify this CSS file to make style adjustments throughout the admin, which includes the field inputs. For example, if you wanted to make a textfield value bold, you could add this:

input[type="text"][name="field_name"] {
  font-weight: bold;
}

At this time it's only possible to specify a field by its name, so if you want to change the style of a specific field it must have a unique name. Adding a style to the "title" field, for example, would style all "title" fields.

Let me know if this helps, or if you have any other questions!

Thanks,

Daniel
Technical Lead
interactivetools.com