Jump to content
Larry Ullman's Book Forums

Two Forms, One Page - Display Only One Form, Not Both

Recommended Posts

Hello there!


The thread referenced (at the bottom) covers how to display two forms on a single page.


However . . .


In the case referenced, both forms are visible on the page by default, and it is only *after* a submit has been detected that the script detects the form sent, and calls the appropriate code.


It seems possible to display only one of the forms based on a user's site visit status.


For example, assume a page contains code for both 'Form A' and 'Form B'.


What I'm looking for is:


1) When the user visits the page for the first time, 'Form A' is displayed by default, then;


2) On any subsequent visit to the page by the same user, during the same session, 'Form B' is displayed by default.


Of course, the submit still gets handled by the processing script, but that's already been covered in the thread referenced.


What's got me snookered is how to determe the visitors status (i.e., new or return visit) so that the appropriate form can be displayed.


 ~ David




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...