Add hidden field in ui_component form magento 2.

Magento you can add a hidden field to the ui_component XML file with the use of attribute formElement=”hidden”.

The hidden field is used mostly for an entity_id field.

Entity_id field is used to fetch the records of a specific object.

<field name="entity_id" formElement="hidden">

When you check the UI component field using Browser Console, It’s available but it’s not visible on the form.

A hidden field is used to post the data to the server with value.