Hidden Form Fields

It would be nice to be able to add hidden fields to forms. Many self hosted form scripts use hidden form fields to tell them how to handle the form and what to do with the data it contains. My preferred form script is the self-hosted Tectite FormMail script. It’s security features are excellent, as too are it’s anti-abuse and spam detection features. The problem is that the script requires hidden fields to do things like direct users to a success or failure page, list email addresses to where the form results should be sent (multiple email addresses supported). It also uses hidden fields to invoke html and formatted plain text responses, plus a whole host of other things. By including a hidden field bric, we could add all the hidden fields we need to make form scripts work. The form itself would then be submitted to the script URL and the script would do the rest. It shouldn’t be too difficult. The only things that a hidden form field requires is a field name and a value. Of course, it shouldn’t be visible on the web page - it just forms part of the form data that gets submitted.


Yeah, I agree :+1:


Try adding a text field to the form. Then add the following custom attributes:

type = “hidden”
name = “”
value = “”

It’s working great for me. Just watch what you put in the fields - everything has to be percent encoded or the characters might be interpreted as html.

A form validation, human test field would be a welcomed addition as well

Yes, I noticed that the forms in Blocs 3 can now contain custom field attributes, a great improvement. Thanks @norm for listening!

I do not see any way to accomplish that in the right sidebar using Blocs 3.4.x. As shown in my screenshot below, after I create a new text field and have it selected, there is nothing in the “type” menu named “hidden” that I can see:


And the “Standard” menu item setting doesn’t show any right sidebar field named “type” or “name” or “value” either.

Can you please provide precise steps with screenshots in the latest version of Blocs showing how you add those custom attributes (i.e., how to create a hidden field with “name” and “type”)?


You can add it using the Custom Attributes in the side bar @JDW.

1 Like

I see. You mean this…


There seems to be a Blocs bug at work. It won’t allow me to add a “name” with no “value.” I’ve tried multiple times entering “-authdb” into “name” and nothing into “value” but it won’t display at all in the latest version of Blocs. Very odd.


I have a form page that currently is built in Softpress Freeway and works great. I am trying to rebuild that page in Blocs, but I cannot for the life of me create all 3 of the hidden fields I need in Blocs, for reasons I just specified. Here is how they look in Freeway:

But Blocs only allows me to create the first two:


OK, after previewing in Blocs, I see it, but it’s putting the silly word “undefined” as the value, but I need “value” to be blank:

Works for me!

Switch off Dark Mode and see if its visible. It’s not visible to me on High Sierra until after I preview, and even then Blocs inserts “undefined” into the Value. It won’t leave it blank like yours.

So right now I am experimenting with a Code Widget to get around all that foolishness, but so far, I cannot recreate my Freeway page without a Server Error. :frowning:

Works just the same (light or dark mode shouldn’t make any difference), and the code previews with the empty value.

Try putting a space in the value field.

Screen Shot 2020-03-02 at 8.24.53 PM

Screen Shot 2020-03-02 at 8.25.53 PM


Seems to be an issue with having a hyphen prefix.

You try it without the hyphen and you can do a no value DA.

I would submit a big report to @Norm.

1 Like

I will submit the bug report to Norm, but for now I have fixed the problem by adding all the hidden fields into the tag via Code Widget.

Thanks for your help and suggestions!