Jump to content

Field description always open


KentBrockman
 Share

Recommended Posts

I can a few different options here.

  1. Use the attached module which uses some jQuery to force the description field open - seems to work fine and I don't think there will be any side effects with it affecting other fields, but you can tweak the jQuery if needed.
     
  2. You could make use of Martijn's new module http://modules.processwire.com/modules/admin-custom-files/ and use the code from the attached .js file.
     
  3. Figure out how to change the status of the collapsed state with a before hook ProcessField::buildEditFormBasics - you'll see I tried a hack - in the attached module, my first approach was not with the associated js file, but instead of the after hook, I used a before hook and used the commented code to make sure the description field wasn't blank. This was ugly, but I couldn't figure out how to change the collapsed status properly in this case - sure I am missing something obvious, but only had a few minutes this morning to look at this.

FieldExpandDescription.zip

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...