2 # $Id: form3,v 1.6 2010/01/13 10:49:52 tom Exp $
3 # form1 with --help-button
7 backtitle="An Example for the use of --form:"
9 ids=`id|sed -e 's/([^)]*)//g'`
10 uid=`echo "$ids" | sed -e 's/^uid=//' -e 's/ .*//'`
11 gid=`echo "$ids" | sed -e 's/^.* gid=//' -e 's/ .*//'`
17 while test $returncode != 1 && test $returncode != 250
20 value=`$DIALOG --ok-label "Submit" \
22 --backtitle "$backtitle" "$@" \
23 --form "Here is a possible piece of a configuration program." \
25 "Username:" 1 1 "$user" 1 10 10 0 \
26 "UID:" 2 1 "$uid" 2 10 8 0 \
27 "GID:" 3 1 "$gid" 3 10 8 0 \
28 "HOME:" 4 1 "$home" 4 10 40 0 \
33 show=`echo "$value" |sed -e 's/^/ /'`
39 --backtitle "$backtitle" \
40 --yesno "Really quit?" 10 30
53 --backtitle "$backtitle" --no-collapse --cr-wrap \
54 --msgbox "Resulting data:\n\
60 --backtitle "$backtitle" --no-collapse --cr-wrap \
61 --msgbox "Help data:\n\
65 echo "Return code was $returncode"