Class HiddenInput<T extends HiddenInput<T>>


public class HiddenInput<T extends HiddenInput<T>> extends Input<T>
HTML hidden input element for storing data not displayed to users.

This class extends Input to provide a hidden field that can store data to be submitted with a form but is not visible or editable by the user. Commonly used for tokens, IDs, and other data that needs to be preserved across form submissions.

Features:

  • Invisible to users
  • Stores data for form submission
  • Name-value pair storage
  • Not affected by user interaction

Usage:

 HiddenInput token = new HiddenInput("csrf_token", "abc123");
 HiddenInput userId = new HiddenInput("user_id");
 userId.setValue("12345");
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • HiddenInput

      public HiddenInput()
      Creates a new HiddenInput with no name or value.
    • HiddenInput

      public HiddenInput(String name)
      Creates a new HiddenInput with the specified name.
      Parameters:
      name - The name attribute for the hidden input.
    • HiddenInput

      public HiddenInput(String name, String value)
      Creates a new HiddenInput with the specified name and value.
      Parameters:
      name - The name attribute for the hidden input.
      value - The value to store in the hidden input.