Jump to content

submit 2 pages to 1 record


This topic is 8564 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi,

I am trying to create a online survey with FM. The survey will be two pages long. And my question is how to have the two pages on the web submitted into one record. Another I wanted to create a coutinue button on the first page and a submit button on the second, but I can't seem to figure out how to combine both pages into one record. Please help... Thanks for any input

Link to comment
Share on other sites

I would make it one page on the web, with the illusion of 2 pages by using an anchor link to "jump" (scroll down) to the 2nd page. The alternative is to use cookies to pass information between pages or create the record on the first page and update it on the second page (using a token).

The first way is by far the easiest.

Link to comment
Share on other sites

  • Newbies

"I would make it one page on the web, with the illusion of 2 pages by using an anchor link

to "jump" (scroll down) to the 2nd page. The alternative is to use cookies to pass

information between pages or create the record on the first page and update it on the

second page (using a token).The first way is by far the easiest."

Thanks for the input... How is the second method apply.. How does the code for update of record look like. My only concern is what happen when a user bail out at the first page?? I'm trying to avoid having a non-completed entry... any ideas..?? thanks

Link to comment
Share on other sites

What is driving doing the survey in one page? Are you trying to avoid scrolling?

It's pretty simple to do one HTML page and make it seem like 2. You can eliminate the scroll bar and have a button or hyperlink that says "Go to the next page". When it's clicked the page will appear to go to another page, but in reality will jump to the second part of the survey, which has the submit button.

The second method is much trickier and relies on the users being set to accept cookies. The third method would indeed leave a partially completed record.

[This message has been edited by dspires (edited December 04, 2000).]

Link to comment
Share on other sites

On the first page, the form submit uses the -New action tag. The -format page will be the second page of the survey. On the second page, the submit button uses the -Edit tag to add the new questions to the existing record.

Link to comment
Share on other sites

unless i just missed it, vaughan kind of touched on it, but try this.

Assuming you're using custom, on the first page have a submit button create the record, then on the next page have it automatically refresh to a third page with a link that looks like this (complete tag):

<meta http-equiv="refresh" content="1; url=[FMP-LinkRecID: format=page.htm, layout=layout]">

(again, this link would go on the second page, within the head tags)

this tells filemaker that you are pulling up the current rec. which would be the same record they just added. I usually put something like, "Processing Information, this page will automatically forward you" or whatever.

Then on the next page, have a filemaker form like you would find on the record detail page when you use the FM Connection assistant in home page (hope you know what i mean) with an -edit button.

I would put "Continue" on the first button, and "Complete" on the second so as not to confuse your users.

jeremy

NOTE to dspires:

the only time i have to do this is when certain fields will affect other fields in the same record, but the fields aren't calculations, they are Auto-enter calculations that can be modified if the user so chooses. or when there are calculation fields that the user needs to see before "completing" the form...

[This message has been edited by yafreax (edited December 05, 2000).]

Link to comment
Share on other sites

Vaughan had it totally correct. You don't need to do anything clever here.

On the first page have the submit button use the -new action. Have the form have the tag of -format="page_of_second_questions.htm" when they submit the first page the record is created.

On the second page create the form as such

<FORM ACTION="FMPro" METHOD="POST">

<INPUT TYPE="hidden" NAME="-db" VALUE="database_of_answers.FP5">

<input type="hidden" name="-format" Value="nextpage.html">

<input type="hidden" name="-recid" value="[fmp-currentrecid]">

plus any other tags you need.

Then make the submit button at the end use the action -edit. You can then have the third page show the person what they have answered to all the questions and click on an ok to submit them or edit them.

The recid and currentrecid on the second page tell filemaker that this is an edit of the record ceated on the first page.

I use this for a CV input section on my website that goes over nine pages. I also have hidden values on each page that when that page is submitted it puts a yes in a box so that the person when they come back and log in to their home page I use [fmp-if] tags to tell them which pages of the cv they have filled in and which they still have to do.

Hope this makes it clear. Anymore help needed just ask. But this really is the simplest way to do it, you don't need java.

Simon

Link to comment
Share on other sites

Actually Simon, the cleverness of this solution is in its simplicity ! ;-)

I've also used this method to create a pseudo field validation scheme for one-page surveys to ensure records have all fields entered.

The first page creates the record as described with the -new tag. The database has a calc field in it that does IsEmpty() on each field (question) to check it has been answered. If not, an IF on the second form re-displays the unanswered questions again. The -format tag on the second form redirects to the exact same html file so if people keep submitting unanswered questions they'll kepp getting them back again. Once all the questions are answered the IF on the page displays a "thanks you for participating" message.

The limitation of this of course is that people can create empty records and not bother to complete them, and the system cannot prevent that. However it's easy enough to search for records that aren't completed and delete them every once in a while, like when the db is backed up or something.

Actually I just remembered that it can also be used for multi-page surveys too. The second page has an IF that repeats the first-page questions if any are answered: when they are the IF displays the second page questions which uses the -format tag to point to the third page. The third page has an IF that repeats the second-page questions if any are unanswered; when they are it points to the fourth page which has an IF on it that...

[This message has been edited by Vaughan (edited December 08, 2000).]

Link to comment
Share on other sites

This topic is 8564 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.