[BUGFIX] Don't add hidden field if it is not enabled

Releases: 6.2
Resolves: #59416
Change-Id: I44e2a57285054bd9a899303a3138c95c8c270ef4
Reviewed-on: https://review.typo3.org/30636
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>