Adding a hidden input element

When you create an input or modification block, the Database Wizard automatically creates an input boxA form field in an input block. An input box accepts user data that will be inserted into a database. for each database field you include in the block, so that the user can enter a value for the field. Sometimes, however, you may want a particular database field to receive a value that is not provided by the user, but is instead either (A) provided by a parameter passed to the document containing the input block or (B) a fixed value provided by the document itself. In such cases, you can associate the database field with a hidden input element.

A hidden input element acts like other input elements in that it provides a value for one database field, but unlike other input elements it is not visible in the input block, and users cannot interact with it. A hidden input element must be assigned a default value, which is always the value that will be inserted into its associated database field. The default value can either be a fixed value you specify when you create the element, or be provided by a parameter passed to the containing document.

Adding a hidden input element is a two-step process. First, you need to add the database field that the element will be associated with to the list of database fields used by the input or modification block. (If the relevant database field is already in the list, you can skip this step.) Then, you insert the new hidden input element into the block.

To add a hidden input element
  1. On the Develop menu, go to Database, click Field,and then click Block Properties.
  2. Click the Database Fields tab.
  3. In the list of database tables and fields on the left, select the field that the hidden input element will be associated with, click Add, and then click OK.
  4. Place the insertion point anywhere inside the table containing the input or modification block. (Since the new element will be hidden, it does not matter where you put it, as long as it is inside the block.)
  5. On the Insert menu, point to Database, and then click Hidden Input Element.
  6. Click the Target field box and select the database field you added in step 3.
  7. In the Default value box, enter the mandatory default valueThe initial contents of an input box, or the initial selection in an input control, when the document is opened in a browser. for the hidden input element. (If you want the default value to be provided by a parameter, click the button next to the Default value box and select a parameter. The menu will only list parameters that have been registered.)
  8. Click OK.

If the display of special tag marks is enabled, you will see a hidden form field mark Namo Web Editor mark hidden form field Adding a hidden field element at the location you inserted the hidden input element. To show or hide special tag marks, click Namo Web Editor button show hide tag marks Adding a hidden field element (Show/Hide Special Tag Marks) on the Standard Toolbar.

Related topics

Adding an input box

Changing a block element’s associated database field

Adding a hidden field element