I've been customizing the "editarticle.tpl" so it will show/hide custom fields upon category selection.
It works fine when I create a new article in that specific category.(then the custom fields appears)
But if I want to edit the article, the custom fields are not showing.
To see the custom fields when I'm editing I have to select some other category (for example "General") and then select the previous category ( for example "CustomCategory"), then the custom fields are shown and I can edit them.
My Jquery is quite simple for this.
The custom fields are wrapped in <div id="cf_group">
And then there is this Jquery to show/hide the custom fields depending on witch category is selected.
Code: Select all
$('select').change(function() {
if ($(this).val() == 4) {
$('#cf_group').show();
} else {
$('#cf_group').hide();
}
});
What I want to be able to do is Just edit the articles without having to toggle between categories to edit the custom fields for the articles that are assign to the category with "option value = =4".
Can some one help me with this?