Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Add class to Form View modes: 
User avatar
Member
Member
paul.truman-sunmed.co - 8/10/2012 10:26:27 AM
   
Add class to Form
Hey, I'm trying to style form controls using jquery, and i need to add a class="text" to the standard <form> tag that's around the entire page. Is this possible to do?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/10/2012 12:35:11 PM
   
RE:Add class to Form
since there should be only 1 form tag on the page, you could just use the CSS selector "form" instead of ".text" to select it.

Otherwise you can add the class using javascript:

jQuery('form').addClass("text");

Or you could add a script runat="server" block in your master page like this:

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Page.Form.Attributes["class"] = "text";
}
</script>