2 # $Id: form1-both,v 1.5 2010/01/13 10:47:35 tom Exp $
6 backtitle="An Example for the use of --form:"
8 ids=`id|sed -e 's/([^)]*)//g'`
9 uid=`echo "$ids" | sed -e 's/^uid=//' -e 's/ .*//'`
10 gid=`echo "$ids" | sed -e 's/^.* gid=//' -e 's/ .*//'`
16 while test $returncode != 1 && test $returncode != 250
19 value=`$DIALOG --ok-label "Submit" \
20 --extra-button --help-button \
21 --backtitle "$backtitle" "$@" \
22 --form "Here is a possible piece of a configuration program." \
24 "Username:" 1 1 "$user" 1 10 10 0 \
25 "UID:" 2 1 "$uid" 2 10 8 0 \
26 "GID:" 3 1 "$gid" 3 10 8 0 \
27 "HOME:" 4 1 "$home" 4 10 40 0 \
32 show=`echo "$value" |sed -e 's/^/ /'`
38 --backtitle "$backtitle" \
39 --yesno "Really quit?" 10 30
52 --backtitle "$backtitle" --no-collapse --cr-wrap \
53 --msgbox "Resulting data:\n\
57 echo "Button 2 (Help) pressed."
61 echo "Button 3 (Extra) pressed."
65 echo "Return code was $returncode"