In this post I am going to explain how to add hidden field in ui_component form in Magento 2.

Check the below example code snippet to add hidden field in ui_component.

Here formElement=”hidden” is used to create a hidden field.

If you want to check the UI component field then you can check it in Browser Console as its not visible in the form.

Thats it. Enjoy Magento 2!!