Prefill hidden fields

Please referer to a custom code shared in this thread:

I would like to prefill hidden fields, the code shared in the thread is working well for normal text fields.

  • Nithin
    • Support Wizard

    Hi Tobias

    By default, the Hidden fields overrides dynamically as configured in the plugin side. As a workaround, you could hide normal fields by hiding using custom CSS. Do you think that would help? That’s by creating a new CSS class which you could add in the default WP customizer, under Appearance > Customize > Additional CSS as followings:

    .hide-custom {
    	display: none;

    Once done, the class name could be added in normal fields so that it would appear hidden, and the mentioned code to pre-fill would work out of the box.

    Please check, and see whether the above workaround helps? If not, and if you are still looking to make use of Hidden Fields, could I know any specific value in the Hidden Fields that you are looking to pre-fill?

    Values such as User Email, Display Name, Page ID etc in Hidden Fields are auto-filled based on the user entries. Please advise if you are looking to override all the Hidden fields, or any specific one so that we could have a better idea.

    Kind Regards,

  • Tobias
    • Flash Drive

    Hi Nithin,

    yes, the css workaround works fine. I don’t need the fields named as “Hidden Fields” for that. Would maybe be great to have an option, to simply mark fields as hidden within the UI.

    The use case above is only one use case for it. Making these fields visible by some logic would be another one.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.