function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BCPEBCPE 

Formatting the style of a CMSForce web form

Does anyone know if/how one can change the style of a web form's font, point size, alignment, etc when using CMSForce?

 

You can currently only select bg color and text color.  Would it be possible to override default appearance of web form with tables or divs?

 

Any input is appreciated!

 

Thanks,

Brian

Best Answer chosen by Admin (Salesforce Developers) 
David VPDavid VP

Hi Brian,

 

what you could do is add a class="mywebformclass" attribute in the html table in the renderform component. This table wraps the rendered web forms.

From there you could then control the appearance of the form by adding in css styles (via a stylesheet or inline style tags) in your page template. It takes a bit of HTML / CSS knowledge but is very doable.

 

Hope this helps,

 

David

All Answers

David VPDavid VP

Hi Brian,

 

what you could do is add a class="mywebformclass" attribute in the html table in the renderform component. This table wraps the rendered web forms.

From there you could then control the appearance of the form by adding in css styles (via a stylesheet or inline style tags) in your page template. It takes a bit of HTML / CSS knowledge but is very doable.

 

Hope this helps,

 

David

This was selected as the best answer
BCPEBCPE

Hey David,

 

The theory makes sense -- I'll get up to speed on adding a class and controling appearances with css styles.

 

I appreciate your input!

 

Thank you, thank you,

Brian

bsjbsj

Hi David,

 

I am facing this same problem. I did not get the part about where to look for this table and how to add the attribute. I have a simple VF page template with a single contentblock and a simple web form that I inserted into this contentblock. How to format the style of each individual field on the web form? Will you please show me in a step by step fashion?

 

Thanks,