Does anyone know the correct and upgrade safe way to customise the Cases module vardefs.php?
I’m a little confused as to how to do this. Is it as simple as copying the file into the ./custom directory ( as below)?
e.g. ./custom/modules/Cases/vardefs.php
What I’m trying to do is disable the WYSIWYG editor from appearing in the cases module as it currently leaves html tags around the description field when in view mode (as opposed to edit).
I can currently get the affect that I want by commenting out the ‘editor’ line in vardefs, see below:
'description' => array(
'name' => 'description',
'vname' => 'LBL_DESCRIPTION',
'type' => 'text',
//'editor' => 'html',
'comment' => 'Full text of the description',
'rows' => 6,
'cols' => 80,
),
You can use a PHP “unset” command to remove an entry. Note that in the extension framework, you just specify what you need to change, not everything. So your file won’t have a full copy of the vardefs, but only a single line with an “unset” for the editor. Needs a QR & R to take effect.
Do you mind quickly checking my syntax and file location here? I think I’ve done “almost” everything correctly, I just seem to be missing that special something to get it to actually work now.
So I’ve created a php file that’s executable below (as per the docs example 4.5):
Thanks for taking a look! It reassured me I wasn’t going completely mad. The problem was that the path was incorrect and something that may need adjusted in the documentations example.