Oro Commerce Page Component

181 Views Asked by At

I need to add js code that check customer added to form has a property or not, if yes do an action. for example in image below I want to check if the customer added to the form has company type or not, if yes then hide a specific part, I am new to OROcommerce and has no idea how to do it can someone help?

enter image description here

1

There are 1 best solutions below

2
On

First, you need to make the Symfony form, used for rendering, dynamic.

If it's the form type defined somewhere in a vendor folder, you'll need to define the above listeners in a form type extension.

Then, you need to handle that with the JavaScript page component: