How to make a hidden input field in Bootstrap Form

Do this exactly like in plain HTML.

Just make a normal input with hidden type. You don’t have to append any extra class to this input, because it’s hidden anyway.

<input type="hidden" name="myHiddenInput" value="">

Full example:

<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <title> example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">

  <form method="POST" action="">
    <input type="text" class="form-control mt-2" name="nickname">
    <input type="hidden" name="securityCode" value="n4NBHu2GpOzjyTOgVmgF3QaS881q084e">
    <button class="btn btn-success w-100 mt-2" type="submit">Submit</button>
    <input type="hidden" name="myHiddenInput" value="">

    <script src="[email protected]/dist/js/bootstrap.bundle.min.js"></script>