Create a multi user input form | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Create a multi user input form

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-03-2010
vidhu0007 vidhu0007 is offline
Registered User
 
Join Date: May 2010
Last Activity: 11 May 2010, 3:13 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Create a multi user input form

Hi All,

Please ignore if terminology used is incorrect as I am new to Unix.

I want to create a Multi user input form which looks something like this:

ABCD TOOL


Logged User: abcd12 Current Directory: /dir1/dir2


Input1: ___________ Input2 : ________________

Input3: ___________


Confirm : Yes/No


I have divided the above form in 3 components:


1. Header: which will display needed information
2. Input: The input given by the user
3. Confirm : this will be a dropdown and will display Yes/No to allow the user to select one.


User should be able to go back/forward (to modify it) from one field to another.


When users selects Yes on confirm, I want to read all the input values.


I searched for some helpful commands and find a few like:
read;

dialog --form;


Now the problem is <read> will pause the execution until the first input is provided which I don't want.


<dialog> I cannot execute this command on my unix server as it says : dialog: command not found.


P.S.

I am trying to execute on a remote server. The Unix kernel has following version details:
SunOS 5.8





Some help would be highly appreciable.
Sponsored Links
    #2  
Old 05-03-2010
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Advisor  
The Tutor
 
Join Date: Jun 2008
Last Activity: 5 December 2014, 6:39 AM EST
Location: INDIA, Bangalore
Posts: 2,049
Thanks: 16
Thanked 106 Times in 102 Posts
It would be helpful if u post the code what u have tried till now
Sponsored Links
    #3  
Old 05-03-2010
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 1 December 2014, 3:41 PM EST
Location: 44.21.48N 80.50.15W
Posts: 1,564
Thanks: 1
Thanked 160 Times in 152 Posts
Are you trying to create an html form, or a text form to run though a telnet session, or a form for an X session.
    #4  
Old 05-04-2010
vidhu0007 vidhu0007 is offline
Registered User
 
Join Date: May 2010
Last Activity: 11 May 2010, 3:13 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
The form is neither a text form nor a HTML form.

It will be executed like this:

>home>dir1>dir2> ./testscript

When the user would run the above command, the form data provided will follow in the same window(same session):

ABCD TOOL


Logged User: abcd12 Current Directory: /dir1/dir2


Input1: ___________ Input2 : ________________

Input3: ___________


Confirm : Yes/No



Displaying the Header part is not a issue.

But I have no clue how to display the Input fields all at the same time and let the user enter the input one by one. Also he should be able to move from one field to other to modify it.

Till now I only used the <read> command.


Code:
echo Input1
read Input1
echo Input2
read Input2
echo Input3
read Input3

I have already mentioned the problem with the <read> command.

Please suggest some commands/ways to do it.
Sponsored Links
    #5  
Old 05-04-2010
pseudocoder's Avatar
pseudocoder pseudocoder is offline
Registered User
 
Join Date: Sep 2007
Last Activity: 17 February 2012, 6:42 AM EST
Location: /home/sea
Posts: 602
Thanks: 40
Thanked 83 Times in 81 Posts
You could do that with C and ncurses, but it's not that easy.
June 2004 Linux Productivity Magazine: Curses, Part 2

Following link might also be interesting for you:
Forms Library
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How Do I Create A Multi Line Menu Variable? SoVi3t UNIX for Dummies Questions & Answers 2 04-08-2010 06:45 PM
how to capture a multi-line input aoussenko Shell Programming and Scripting 5 06-25-2009 09:06 AM
How to create short form for directories? smr_rashmy UNIX for Advanced & Expert Users 8 01-27-2008 03:44 AM
Multi User Multi Task Reza Nazarian UNIX for Dummies Questions & Answers 6 04-13-2006 10:23 AM



All times are GMT -4. The time now is 05:21 AM.