I added these lines to the nodeteaser form, but it doesn't affect the form at all.
'#collapsible' => true,
'#collapsed' => true,
What do I need to do to make the form collapsible?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | nodeteaser-collapsible.patch | 1.26 KB | jillelaine |
Comments
Comment #1
nevets commentedThis should do it, in _nodeteaser_form() change
to
Comment #2
nevets commentedOpps
$form[holder']should be$form[;holder'](missing a single quote)Comment #3
jillelaine commentedi tried the code above (after some minor edits), but it doesn't work. :-(
i looked at other modules that allow collapsing, but was not able to solve the riddle of how they work.
any help is appreciated!
here is the code i used (replaces the function _nodeteaser_form in nodeteaser.module)
Comment #4
jillelaine commentedGot some code that works! With this code, the nodeteaser field will be collapsed by default. Change to '#collapsed' => FALSE, to switch the default behavior.
Replace the nodeteaser.module function _nodeteaser_form with the code below to make the nodeteaser collapsible.
Please review! Comments? Thank you for all the input on this.
Comment #5
Christefano-oldaccount commentedjillelaine, can you create and post a patch?
Comment #6
jillelaine commentedHere is a patch to make the nodeteaser.module collapsible.
To apply the patch, copy the nodeteaser-collapsible.patch into the same folder as your nodeteaser.module.
Then, at the command line:
This command will create a back up of your original nodeteaser.module named nodeteaser.module.orig and patch the code in nodeteaser.module.
Feedback requested please. Thank you
Comment #7
mdupontThe 4.7 version of the module (and Drupal) seems no longer developed. Closing.
Comment #8
mdupont