KentBrockman Posted September 27, 2014 Share Posted September 27, 2014 We are using the description for nearly every field in the manager. By default the description field is closed. Is it posible to always open it by default? Thank you so much for your support. Link to comment Share on other sites More sharing options...
sforsman Posted September 28, 2014 Share Posted September 28, 2014 Do you mean the field edit view or the page edit view? What theme are you using? Link to comment Share on other sites More sharing options...
kongondo Posted September 28, 2014 Share Posted September 28, 2014 I believe KentBrockman is talking about field add/creation page... Link to comment Share on other sites More sharing options...
KentBrockman Posted September 28, 2014 Author Share Posted September 28, 2014 I'm talking about the field "Description -> Additional information describing this field and/or instructions on how to enter the content." when you are editing a field. We are using our own theme, which provides the colors and look of our company design. Link to comment Share on other sites More sharing options...
adrian Posted September 28, 2014 Share Posted September 28, 2014 I can a few different options here. 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. 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. 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 4 Link to comment Share on other sites More sharing options...
KentBrockman Posted September 28, 2014 Author Share Posted September 28, 2014 Perfect! I chose option one. Thank you! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now