Hidden fields can be very effective in a form if used the right way. There is no right and wrong way per say to use hidden fields it just all depends on your use case and how you want the form to work. Hidden fields can be used for a number of different reasons from hiding a text box that may be used for admin use when reviewing a form or whether it could be to add up totals and inject the total into an email/another form, depending on your use case depends on what fields you hide and why.
As noted, hiding fields can be used for multiple reasons. Not only can you hide fields but once hidden you can set who can edit the information or it can be set so no one can edit the information. There may be situations where a form is being reviewed an for admin purposes the box at the top of the page is hidden from and operator users completing the form, but a scoring system may be detailed at the top of the page in the hidden box for admin users to assess and score the form. Another use could be to total the score on a form so, at a quick glance, admin staff know the result of the form but the operator/user does not as this field is not visible to them.
Firstly, you need to navigate to the form builder page of the desired form and there you need to select the desired field you want to hide. Once you have selected the specific field you will see a number of options appear at the top of the page.
The options shown in the image above are what you would see when trying to apply a hidden field to a text box. you may see other options if you apply this to a number field or product total.
you can see here you have options for; field name, who can see the field, who can edit the field, how long the textbox is, if the title is visible, if the field is mandatory and the logic symbol to apply logic to the filed. The only two options we need to worry about at the moment are who can see the field and who can edit the field. If you select who can see the field you will notice a drop-down appears with 3 selections you can make.
By default, the selection will be 'Everyone' so everyone accessing the form can see the field. 'Admin Only' meaning only admin users can see the field and 'Hidden' means the field is hidden from everyone. You would use the term 'Hidden' in situations where you want the field to contain a fixed value. Making a field completely hidden would be useful when using API calls and Data Search terms whereas 'Admin Only' would be used if an admin were to edit/ use for office based tasks.
Once you have chosen your selection, you will either be given the option to choose who can edit the information or you will be given the option to add a fixed value as mentioned for API's and Data Search.
If selected 'Admin Only' you will be given the choice to decide who edits the information, as mentioned this could be useful for applications or order forms where notes are needed to be made.
As you can see above the field can be made editable by admin only or not editable at all. you have these 2 choices as you may want it to be displayed to admin users as just information on a scoring system for the application or you may want to make it editable so they can add notes. depending on the nature of your field depends on what selections you would make.
Once completed so that only an admin user can see and edit the details in the selected field, it should look like this.
The final form can now be published. Once opened on a device, these hidden fields will not appear if the person completing the form is a normal user, so in effect, the field will be non-existent to that person, and don't worry about the display of your form, that won't change either and it will eliminate any spaces between visible and non-visible fields.