Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

How to Apply CSS styles to different Forms?

Vote:
 

Hi All,

I created different forms and i understand how to apply css to textboxelementblock.ascx like element blocks. But if apply like that entire application where ever i used that element same style will apper. But i wish to change that element styles based on forms.Could anybody help me?

Thanks,

Lakshmi R

#186630
Dec 28, 2017 13:59
Vote:
 

I moved this topic to the Forms forum.

#186634
Dec 28, 2017 16:59
Vote:
 
#186635
Dec 28, 2017 17:10
Vote:
 

The simplest way to archive your requirement is that when you create a form you make it render a metadata attribute. Then you using CSS Attribute Selectors to apply the style for the form. Your styles will be applied for all forms with the metadata.

form[data-f-metadata="mymetadata"] {
    background-color: yellow;
}

Hop this helps.

#186679
Jan 02, 2018 11:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.