Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

Multi-page Form (from another forum)

$
0
0

I may have been in the wrong forum, so I copied my issue here.  No arrogance intended.  Please forgive me for not knowing which forum to use.

 

I have a multi-page form, which is basic.  The form's first page is to post a new person's fist and last name.  The second page is for the person's current address.  Of course, there's more objects/database fields than this, but I need page 1 to go to page 2 smoothly, and without much pause.  Page 2 is the exact same person as page 1.  The ID for the person is created on page 1, somehow.

 

How do I get the 2nd page form to know it's the same person on page 1?  Do I use call_number =form.ID or ID=ID or what?  Does the form on each page have be the same name?  Does the ACTION have to be the name of the next page in the form (page2), or the name of the page which submits the data?

 

 

PAGE 1 "The Name"

<CFQUERY DATASOURCE="people" NAME="nw">

     SELECT *

     FROM people_table;

</CFQUERY>

<HTML>

<HEAD>

<TITLE>Add an Entry.</TITLE>

</HEAD>

<BODY>

<TABLE>

     <TR>

          <TD>

<FORM

     ACTION="p_in.cfm"

     METHOD="post"

     NAME="formNewPersonPage1">

<INPUT

     TYPE="hidden"

     NAME="peopleID">

<INPUT

     TYPE="hidden"

     NAME="entry_date_time"

     VALUE="now()">

Your First Name:

<INPUT

     TYPE="text"

     NAME="people_nm_f"

     SIZE="30"

     id="First name">

<P>

Your Last Name:

<INPUT

     TYPE="text"

     NAME="gb_entry_nm_l"

     SIZE="30"

     id="Last name">

<BR>

<P>

Checkbox if Male:

<INPUT

     TYPE="checkbox"

   NAME="people_nm_male_x">

          </TD>

     </TR>

</TABLE>

</FORM>

</BODY>

</HTML>

____________________________________________________

PAGE 2 "The Current Address"

<CFQUERY DATASOURCE="people" NAME="nw">
      SELECT *
      FROM people_table
      WHERE formNewPersonPage1.peopleID=ID;
</CFQUERY>
<HTML>
<HEAD>
<TITLE>Add an Entry Page 2</TITLE>
</HEAD>
<BODY>
<TABLE>
      <TR>
           <TD>
               <FORM
                    ACTION="p_in.cfm"
                    METHOD="post"
                    NAME="formNewPersonPage2">
Your Street #:
     <INPUT
          TYPE="text"
          NAME="peopleStreetNbr"
          SIZE="30">

Your City:
     <INPUT
          TYPE="text"
          NAME="peopleCity"
          SIZE="30">
  <BR>
Your State:
<P>
     <INPUT
          TYPE="text"
          NAME="peopleState"
          SIZE="30">
<P>
          </TD>
     </TR>
</TABLE>
</FORM>
</BODY>
</HTML>


Viewing all articles
Browse latest Browse all 14291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>