What should i follow ui_component form
or php form
so my module can work on all magento 2 versions. Or Should i create two modules so they will work on magento 2.0 and magento 2.1?
Any one else have a better solution for that?
3 Answers
Magento 2.0 totally supports UI Component form, it's not a 2.1 feature only so I suggest you use the UI Component ;)
Also you can find the benefits of using the UI components here: Magento 2: what are the benefits of using UI grid components over the standard Grid.php?
-
i tested it was not working with magento2.0 magento.stackexchange.com/questions/135087/… Commented Oct 7, 2016 at 10:41
-
@QaisarSatti you probably have another error somewhere, refer to the sample ui component form module here: github.com/magento/magento2-samples/tree/master/… Commented Oct 7, 2016 at 10:42
-
funny thing first i tested this free module but the
save
and other button are not loading then i added button from block follow the magentom2.1
i got this error it solved after move tom2.1
Commented Oct 7, 2016 at 10:45 -
@QaisarSatti try switching to 2.0.9 instead Commented Oct 7, 2016 at 10:46
Magento 2.1 you should go with Ui Component for grid and if you don't have any customization in your form then you can use Ui component for form too, but if you have any customization or any changes in buit-in form input types you can use normal php form. but as Magento 2.1 has lots of benefits I prefer to use Ui component for more benefits and use you can refere MagentoDocs
Use ui_component
you can do lot of customization with ui_component
I used to do custom php forms, but once you realize the power of ui_component
I'm sure you'll use it after
You can extend your ui_component elements so you can do whatever, you need.