Editor: Hidden Widget

The Hidden widget is used to include data in a form that has to be hidden. The concept is pretty simple, it allows us to have a session identifier in forms without having to show that identifier to the end users. The form session identifier is necessary to allow the saving of the data in the form. Otherwise we assum that a hacker is trying to send spam to the server.

In standard HTML forms, one can use an input typed "hidden". Many people make use of those to carry data on the client side instead of the server side. We strongly suggest that you instead make use of the user session on the server side. It is generally a lot safer, although if you have to save sensitive information such as credit card numbers, you need to encode that data and thus saving it in a hidden field could be a lot easier.

The Hidden widget does not exactly have a result. In general it is viewed as plain text and is always sent back to the server whenever the Save button is clicked or the Auto-Save feature runs.

Example

The sesion of an Editor form is defined with the editor session field as follow:

<widget id="editor-session"
        type="hidden"
        field="editor::session"
        path="name_of_the_form/form/selector/session">
</widget>

As we can see, the type is set to hidden. The only parameter you need to change in the editor session widget is name_of_the_form.

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly