present [--form <menu>] [--keep]
form Configure IPv4 networking on ${netX/mac}
item netX/ip IPv4 address
item netX/netmask Subnet mask
item netX/gateway Gateway address
item dns DNS server address
present
form Login details item email Email address item --secret password Password present
Display an interactive form and store the resulting value in the specified setting for each form item.
If no form is specified, the default (unnamed) form will be used. The form will be automatically deleted unless the --keep option is specified.
| Success | Settings were edited successfully |
|---|---|
| Failure | Settings were not edited successfully |
The user is able to use Ctrl-C (or Escape) to exit the form without making a selection. You may therefore wish to always handle failures of the present command. For example:
present || goto error
You can use any valid setting name, including a scope and type. For example:
set dest:ipv4 8.8.8.8
set count:uint8 1
form Test network connectivity via ping
item count:uint8 Ping count
item --default dest:ipv4 Destination IPv4 address
present
ping --count ${count} ${dest}
You can add a background picture to enhance the appearance of your form using the console command.