0
This script creates a form in a terminal window with one column and four rows. How can I create a form with two columns and two rows?
shell=""
groups=""
user=""
home=""
exec 3>&1
VALUES=$(dialog --ok-label "Submit" \
--title "Useradd" \
--form "User form" \
15 50 0 \
"Username:" 1 1 "$user" 1 10 10 0 \
"Shell:" 2 1 "$shell" 2 10 10 0 \
"Group:" 3 1 "$groups" 3 10 10 0 \
"HOME:" 4 1 "$home" 4 10 10 0 \
2>&1 1>&3)
exec 3>&-
This script produces:
I would prefer this arrangement of the input fields:
I have tried to add a second --form
option, but it didn't work.
I also have tried to add a second input field on the same row, but starting after the first, like this:
"Second field:" 1 41 "$second" 1 10 10 0 \
It creates two headers, on the same row, but only one input field – on the next row.
If you're having trouble understanding the man page you could also check this. Which does have an information about how the fields are defined
– Seth – 2017-04-27T08:59:26.823[ label y x item y x flen ilen ]
.