We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Add class or id to Control Panel block holding custom field type instructions

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

I’ve successfully created an extension that adds a Custom Field type. I would like the instrutions area of this custom field type to have a new class. I need to be able to target those somehow - probably with a class as I may have more than one type of this field. Here’s what I’m seeing under the hood right now (simplified for legibility):



Let’s say I want to add a class of “crazyLegs” to the instruction area, which I know I can simply do with some jQuery - but there’s no way to target the field, so I would think I’d have to re-write the output of that field block a bit. I’m looking for something simple like this:

<div class='publishRows' >

...

<div class='paddedWrapper crazyLegs' >
<span class='defaultBold'>Instructions: </span>
these are my incredible instructions. I want them formatted in a special way. 
And because of the 'crazyLegs' class, I can now format these in a super special way!

</div>

[field content here]

</div>

Everything works fine in my extension now, but I’d just like to do up the instructions in a certain way for this custom field type. Thanks.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

I’ll just manually add a div inside the Instructions field for this field type right now, but it would be nice to not have to remember to do so.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

Well, I just ended up using jQuery instead and coming up with a new Extension called “Dulee Noted”. So, head over to the thread for Dulee Noted.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.