Page 1 of 1

Hide field from the specification dynamic form

Posted: 14 Apr 2021, 10:09
by E.P-B
Hi,
I need to simplify the backend for a specific project. How can I hide Images fields (for instance) from the specification form in the backend ?
I don't know which file I can override...
Thanks in advance,
E.P-B

Re: Hide field from the specification dynamic form

Posted: 16 Apr 2021, 16:35
by Jan
Hi, can you paste a screenshot of what do you exactly mean?

Jan

Re: Hide field from the specification dynamic form

Posted: 21 Apr 2021, 14:08
by E.P-B
Hi,
Here is what I try to have as a specification subform :
Image

Having a list instead of a text field is done like explained in this post: viewtopic.php?p=166137#p166145

To hide unneeded fields, I've hacked media/system/js/subform-repeatable.js and modified old code :

Code: Select all

[end of first line].subformRepeatable()}})})(jQuery);
By:

Code: Select all

[end of first line].subformRepeatable();
	var epb_fields = ['alias','alias_value','group_id','image','image_medium','image_small','color'];
	for (var i = 0; i < 9; i++) { 
		for (var j = 0; j < epb_fields.length; j++) { 
			$("#jform_specifications__specifications"+i+"__"+epb_fields[j]+"-lbl").parent().parent().hide();
		}
	}
}})})(jQuery);
This is really dirty... but I didn't find any proper way to do this...
E.P-B

Re: Hide field from the specification dynamic form

Posted: 21 Apr 2021, 16:26
by Jan
Ok, thank you.