-
-
Notifications
You must be signed in to change notification settings - Fork 570
Forms
Jakub T. Jankiewicz edited this page Feb 1, 2024
·
2 revisions
To use forms you need to include this file:
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/forms.js"></script>
Forms extension provide functions (they all async so they return a promise):
-
$.terminal.forms.form
- this is general tools that execute the other functions based on input data. -
$.terminal.forms.checkboxes
- renders terminal checkboxes and allows to pick any number of items, it returns an array. -
$.terminal.forms.radio
- renders a list of options similar to radio buttons where only one can be selected. -
$.terminal.forms.boolean
- ask a question that can be answered with two values and return boolean. -
$.terminal.forms.input
- similar to read, return a string. -
$.terminal.forms.password
- ask for password and return a string.
To see how they work you can look at CodePen demo.
Library for Web-Based Terminal in JavaScript, (jQuery Terminal: git repo)
Copyright (c) 2011-2023 Jakub T. Jankiewicz