[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference gyro::internet_toolss

Title:Internet Tools
Notice:Report ALL NETSCAPE Problems directly to [email protected].rnet? Read note 448.L for beginner information.
Moderator:teco.mro.dec.com::tecotoo.mro.dec.com::mayer
Created:Fri Jun 25 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:4714
Total number of notes:40609

4539.0. "A couple of questions about Form implementation" by ALFSS2::MITCHAM_A (Andy in Alpharetta (near Atlanta)) Wed Mar 12 1997 10:53

    Question #1:
    
    Can a form span multiple html documents?  Can multiple forms be
    submitted as one action?  Am I making any sense? :-)
    
    I have a need to create a form which, unfortunately, will be large 
    enough for (at least) two screens full of information, and I would 
    like to break this down into multiple pages so it won't appear so
    overwelming.
    
    As a workaround, I have considered placing an anchor in order to 
    jump elsewhere within the document to the next screen of 
    information, but because of differences in screen sizes, etc. the 
    preferable way for me would be to have multiple pages (documents).
    
    After the information is gathered from these multiple pages, I 
    would then like it submitted in one form action to be sent to my 
    email address.
    
    Is this possible?  I am open to suggestions...
    
    			---------------------------
    Question #2:
    
    The form in question is actually for part of an order system
    whereby a customer may submit checking account information via a
    two-step process.  Step one, submitting the above info, provides 
    most -- but not all -- the checking information one would need to 
    access a checking account.  Step two, submitted as a separate form, 
    sends the remaining required info.
    
    Common to both steps (forms) are the requirement for the individual's
    name and email address.  Rather than making them enter this info 
    separately on each page, it would be nice to enter it once (on 
    form #1, for example) and somehow cache the info for form #2.
    
    I've heard of "cookies" though I have no knowledge of their use and 
    I'm not sure if this would be a practical implenetation.  
    
    			---------------------------
    
    FWIW, I am fairly proficient with html, but know little of anything
    about java, perl, javascript, etc.  If the use of any of these 
    scripting languages is the only way toward a solution, a pointer 
    or two would be helpful!
    
    -Andy
T.RTitleUserPersonal
Name
DateLines
4539.1VAXCPU::michaudJeff Michaud - ObjectBrokerWed Mar 12 1997 11:2452
> Can a form span multiple html documents?

	No.  But a FORM can span multiple "pages" (as defined by the
	renderer, ie. the users browser, ie. "screen full").

> Can multiple forms be submitted as one action?

	yes, using JavaScript.  With just plain HTML, no.

> Am I making any sense? :-)

	That's something you'll have to decide for yourself :-)

>     After the information is gathered from these multiple pages, I 
>     would then like it submitted in one form action to be sent to my 
>     email address.

	If I'm reading you right you don't want one FORM that
	straddles multiple documents, but a form on each page,
	where the document returned from submitting the FORM on
	one page brings up another page with a FORM that asks for
	additional information.  And to keep the server stateless,
	you want when you submit the final form on the final document
	to submit all the information entered on all the forms the
	user filled out.

	If you are generating the documents (HTML) on the fly, this
	is quite easy to do.  What you want to do is to generate
	each FORM with <INPUT TYPE=HIDDEN NAME=... VALUE=...> elements
	that contains the data entered by the user on the previous FORM.
	So each FORM in succession accumulates all the information
	entered on all previous FORMs.  Do make sure to keep the NAME's
	on the set of FORMs unique.

	This is actually quite common in a situation where you enter
	information on the 1st FORM, then get a "confirmation" page
	that outputs what you entered and you press "confirm" on
	the second FORM to actually do the real action you want.

>     Common to both steps (forms) are the requirement for the individual's
>     name and email address.  Rather than making them enter this info 
>     separately on each page, it would be nice to enter it once (on 
>     form #1, for example) and somehow cache the info for form #2.

	again, use HIDDEN form elements to carry forward elements entered
	on previous forms in the sequence of forms.

>     I've heard of "cookies" though I have no knowledge of their use and 
>     I'm not sure if this would be a practical implenetation.  

	alot of people disable cookies in their browsers so I'd avoid
	them.
4539.2teco.mro.dec.com::tecotoo.mro.dec.com::mayerDanny MayerWed Mar 12 1997 11:3745
>    Can a form span multiple html documents?

	No.  There is no such thing from an HTTP/HTML point of view.  HTTP
  closes the connection after each request is completed.

>  Can multiple forms be
>    submitted as one action?  Am I making any sense? :-)

	No, except in the sense that the receiving software will have to treat
  all the received information as multiple forms.  That can be done, you just
  can't have multiple true forms sent in one action.

>    As a workaround, I have considered placing an anchor in order to 
>    jump elsewhere within the document to the next screen of 
>    information, but because of differences in screen sizes, etc. the 
>    preferable way for me would be to have multiple pages (documents).

	Anchors have their own problems (I know because I tried to use them).
  In essense, the browser will refetch the page with it's defaults, rather than
  what's been filled in so far.

>    After the information is gathered from these multiple pages, I 
>    would then like it submitted in one form action to be sent to my 
>    email address.
>    
>    Is this possible?  I am open to suggestions...

	No, but it's a nice idea, except the one about it being sent to your
  email address...

	What you should do, is set up the first form and have them submit that
  form to an action which will take that data and put it into a database which
  will return a key.  Have the result of the action be a new HTML page containing
  that key as a hidden entry in the form (<INPUT TYPE="HIDDEN" NAME=KEY
  VALUE=key1234>.  When they submit that you can use that to update the database
  information each time they enter something.  In fact, if this is an order
  entry system, you can give the customer a key id that they can use to bypass
  the initial information screens after the first time.  Note that all of this
  requires programming on the server side and an understanding of CGI, database
  access, etc.  This is a programming problem, not a HTML problem.  You may
  want to look at Livewire Pro if the server is Netscape, or Active Server Pages/
  VBScript if the server is Microsoft's IIS.  Any other server would probably
  need some custom-build code, done the old-fashioned coding way.

		Danny