Linking Forms

  • Thread starter Thread starter Marc
  • Start date Start date
M

Marc

Using frontpage 2000, I'm trying to create linked forms for data entry (a
survey) as successive Confirmation pages - so that the submit action on the
first triggers both data recording and movement to the next carrying forward
key identifiers as Confirmation Fields. Is this possible? Is this the right
way to set it up?

Right now, having built 3 forms and simply using email confirmation to test,
submiting the first form fires off the next two at the same time! Skipping
the data entry on the second form. How to resolve? Should I forget the
testing via email and just go set up the database that I ultimately will need?
 
Hi Marc
Are you wishing input the entries into a database at each step or
populating the next form with the data from the last?
Paul M
 
Thanks for responding, Paul. I don't really need to populate forms with
information from those that proceed, other than to assure they can be linked
in the resulting database. Respondent name and organization would be nice,
however, just to personalize the running dialogue in the form instructions to
the viewer.

To be clear, I had planned a series of forms (like Survey Monkey) so that
users would not have to scoll through one long page of 20+ questions, but
it's proving problematic. I fixed the double-fire issue by throwing up an
intervening confirmation page - without a Form and its required Submit
button, but now the fields originally named and captured on the first form
don't pass to the second form. This will create a big problem to link tables
in the database - assuming that Frontpage will generate and populate one
table for each form, once I get to that phase.

FYI: Not knowing what script runs behind the scenes, I was thinking that it
might have been possible that the double fire was a result of having copied
the first page htm with modification in creating the second page. When I had
the double-fire, the defined fields were also captured by the second form.
 
Hi Marc
I presume you are using the frontpage wizard to do the database inputing. If
you are before you start you might consider not using it as it can be very
restricting. I dont think you can save the input form as an asp page which
would make the following impossible search for some asp code (presuming you
are on a windows server ) to input the form to database,it might take a bit
of figuring out when it comes to adding your own fields but it is well worth
it.
I would post the first form to the second page with the next form in it and
collect the previous form information. using asp. The information you dont
want to be seen on the second form can be collected in a hidden form field
then this form can be posted to the last page with the third form, then at
this point you can input the information into the database.


Paul M
 
Sounds much more tricky than I anticipated. By your suggested method, I
would also need error trapping in case entire survey was not completed or all
info would be lost.

Actually, I've made some progress with methods aplied so far. If I could
just find a more unambiguous field that would pass between or be
automatically captured by the forms, it would work. The Date/Time fields and
IP address are pretty good for my purpose. The system field "Username" would
be added protection for my scheme. How does that field get populated? Could
I simply name a field on the first form Username to get the input? (my
Frontpage documentation suggests that it's from a website loggin - which is
not required. But that still begs the question of how it gets populated)

Also, I'm assuming that ASP pages will behave differently then these
standard form data collection to textdata file/email things work. The dual
page trigger problem did not go away when I created a fresh form from
scratch.

Lastly, the hidden field option that I find within the Form Properties Save
Fields dialogue box requires a constant value to be entered. Are such fields
created differently on ASP pages?

Marc
 
Hi Marc
To pass and collect information from one page to another is one of the
basic functionalities of asp. It will be hard if not imposible to do this
without it or som other serverside language
here's how.
lets say you have a form field in the first form called firstname. you post
the from to the second page which collects the firstname field information

The second page code this must be an asp page


This collects the information from the first form (firstname) and stores it
in a variable called strFirstname

<%
Dim strFirstname
strFirstname= Request.form("firstname")
%>

Now you have this variable you can choose write it anywhere on the page
like

<%
Response.Write (strFirstname)

%>

Or as in your case you can add into another form field (hidden or not
hidden) by adding the response.write code to the field value like


<input type="hidden" name="id" value="<% Response.write(strFirstname %>" >

You can then send the form to the next page or process it .
here is an example of geting the from contents into a database (access in
this case)
http://www.stardeveloper.com/articles/display.html?article=2000040101&page=1
just change/add the form field names, Dim (variables) the recieving form
variables lines and then the fields of the sql insert to match your database
fields

To create the access database I often let frontpage do this for me by
creating the form with all the fields you require then in form properties
get frontpage to create the access database for me from my form.

There are lots of free asp tutorials out there if you decide to get into it.

Best wishes
Paul M
 
You can also just use shorthand for the variables after you have them from the form
<% =strFirstname %>" >

PS
<input type="hidden" name="id" value="<% Response.write(strFirstname %>" >
should be
<input type="hidden" name="id" value="<% Response.write(strFirstname) %>" >
or just
<input type="hidden" name="id" value="<% =strFirstname %>" >
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi Marc
To pass and collect information from one page to another is one of the
basic functionalities of asp. It will be hard if not imposible to do this
without it or som other serverside language
here's how.
lets say you have a form field in the first form called firstname. you post
the from to the second page which collects the firstname field information

The second page code this must be an asp page


This collects the information from the first form (firstname) and stores it
in a variable called strFirstname

<%
Dim strFirstname
strFirstname= Request.form("firstname")
%>

Now you have this variable you can choose write it anywhere on the page
like

<%
Response.Write (strFirstname)

%>

Or as in your case you can add into another form field (hidden or not
hidden) by adding the response.write code to the field value like


<input type="hidden" name="id" value="<% Response.write(strFirstname %>" >

You can then send the form to the next page or process it .
here is an example of geting the from contents into a database (access in
this case)
http://www.stardeveloper.com/articles/display.html?article=2000040101&page=1
just change/add the form field names, Dim (variables) the recieving form
variables lines and then the fields of the sql insert to match your database
fields

To create the access database I often let frontpage do this for me by
creating the form with all the fields you require then in form properties
get frontpage to create the access database for me from my form.

There are lots of free asp tutorials out there if you decide to get into it.

Best wishes
Paul M
 
Back
Top