########################## ##### OPTIONS PAGE ##### ########################## my $EMAIL; $w{2}->add( undef, 'Label', -y => -10, -text => "Please add email address here below in the event that the results will be mailed to you(Optional)\n" ); my $temp; my $ent1; $w{2}->add( undef, 'Buttonbox', -y => -7, -buttons => [ { -label => " [EMAIL] ", -value => 1, -onpress => sub { my $cui = shift()->root; $EMAIL = $cui->question("PLEASE ENTER EMAIL:"); if ($EMAIL) { $ent1->text("Address: $EMAIL"); } else { $cui->dialog("Question cancelled."); } }, }, ], ); $ent1 = $w{2}->add( "ent1", "TextEntry", -y => -5, -width => 100, -readonly => 1, -focusable => 0, );