jquery .CSS trouble

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

23 Jan 2014

I wanted to change the styling of a specific field using jquery. I thought it would go something like this... but nope.


//Increase size of Comments Box

fd.field('commentsSpecReq').control().css("width", "400px");

OR


$('.fd_field[fd_name="commentsSpecReq"]').css("width", "400px");

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

24 Jan 2014

Well i guess i could assign it a specific class in the UI designer and then set the CSS as found here...
viewtopic.php?f=1&t=40

but i am still curious what i was doing wrong

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

24 Jan 2014

Please, assign CSS class to your field in Forms Designer (my-field in this example) and define it in CSS-editor following way:

Code: Select all

.my-field textarea {
	width: 400px !important;
}

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests