Hide field from the specification dynamic form

Phoca Cart - complex e-commerce extension
E.P-B
Phoca Member
Phoca Member
Posts: 12
Joined: 13 Apr 2021, 21:42

Hide field from the specification dynamic form

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Hide field from the specification dynamic form

Post by Jan »

Hi, can you paste a screenshot of what do you exactly mean?

Jan
If you find Phoca extensions useful, please support the project
E.P-B
Phoca Member
Phoca Member
Posts: 12
Joined: 13 Apr 2021, 21:42

Re: Hide field from the specification dynamic form

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Hide field from the specification dynamic form

Post by Jan »

Ok, thank you.
If you find Phoca extensions useful, please support the project
Post Reply