Jump to content

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

Recommended Posts

Posted

Help,

I have a web form, long very long, I want to break it into 3 pages. One would enter data on 1st page, click next and will take user to next page to enter more data, clikc next and it will take them to last page of form and enter more data. THEN, would click submit and data from all pages would post on db as one record. I am not editing form.

HOW can I accomplish this with out loosing data? ANY Suggestions or recomendations. Thanks

Posted

This is exactly what I am trying to accomplish, only with xml and xsl though. I would do it in CDML if it would work. There has to be a way to submit the hidden values in the form and plug them into another hidden input and continue this process until the end, then submit it all to the database. If anyone knows anything about this please reply.

Thanks.

Posted

I assume that the Form will create a new record.

The first page would use a "-new".

The following pages would use:

<input type="hidden" name="-recid" value="[FMP-CurrentRecID]">

and a "-edit".

Hope this helps.

Garry

Posted

Thanks for your reply. I have a newbie question (cuz I am a new to CDML). If a user is working with a multi-form like how we're talking, and they take a long time to fill out the 2nd form, and while they're filling it out, a different user comes along and starts on page 1 of the form, does the recid keep track of each person's submission/session?

Posted

Yes, the multiple page web entry strategy that Garry Claridge talked about works fine if you are using one database, but what if you are using two or more? Say for example you have a 3 page process of getting the users PIN #, and course that they want to take an evaluation, then the confirm page that has the info they just submitted, then on the next page you want the second database filled with questions that they are to answer with each record being a new question, then they fill out a response to each, then when they submit it submits it into another database, which includes the users PIN #, course, and question and response. You cannot use the recid with this because you have two databases and when you call upon the other database filled with questions, you are losing the recid and the user inputed data in the process. Can anyone tell me how this is done?

Posted

Justin, "...with each record being a new question, ..." sounds to me like poor design. Poor design creates problems.

I would recommend that you reconsider your basic design.

If you really, really, really need to have each question be a new record, you might consider using portals to create the new records or the InLineAction tag.

But I say start by looking at the basic design and other ways to achieve your goal.

Posted

You can look at using "Tokens" or "Cookies" to pass the PIN and Course from page-to-page.

To submit multiple records look at setting-up a Portal (As Keith said). Or, use PHP etc to process and array of answers.

All the best.

Garry

Posted

Assumption: "Page 1" uses a "-new" and calls "Page 2" as the Format file.

Page 2:

<input type="hidden" name="-format" value="page3.html">

<input type="hidden" name="-recid" value="[FMP-CurrentRecID]">

....

<input type="Submit" name="-edit" value="Submit Answers">

</form>

Page 3:

<input type="hidden" name="-format" value="thankyou.html">

<input type="hidden" name="-recid" value="[FMP-CurrentRecID]">

....

<input type="Submit" name="-edit" value="Submit Answers">

</form>

All the best.

Garry

  • 3 weeks later...
Posted

Thank you Garry,

There is another issue. I wan the user to select a submit button from two and based on the selection it will take them to two different pages.

ex.

After you get to page using edit. page3 will have two choices. one continue to page four for more editing and other to chose to complete and give them a page with a confirmation page.

Please advise.

Posted

I've used Javascript for this type of action. Here is an example:

<input type="hidden" name="-edit">

</form>

<a href="Javascript:document.myform.elements['-format'].value='nextpage.html';document.myform.submit();">Continue</a>

<a href="Javascript:document.myform.elements['-format'].value='finish.html';document.myform.submit();">Finish</a>

Good Luck.

Garry

  • 4 weeks later...
Posted

Can this be used in the case of a long form where a person needs to quit and come back at another time to finish? If so, how would they access the same record, through a search? Is there a place in the initial form to put the CurrentRecID to match them all together?

Posted

You will be able to assign each user a unique ID for each survey. You could use the RecID, however it may be a bit too hard to remember. Hence, you could construct one which would be a bit easier to use.

All the best.

Garry

Posted

Actually I've done that, I have created a unique, auto-entry field for each case. How do I tie them together, though? The field is named CaseNumber. Is the number generated only when the case is submitted to the db?

What I've been working on is a "thank you" page that confirms the data has been submitted to the db, and then gives the CaseNumber and tells the individual to write the number on the form for future reference. I haven't been able to get the number to show up, however. This would be the situation where the individual completed the information and submitted it, not one where they stopped in midstream. As of now I have one very long form with a submit button at the end. After pressing submit the "thank you" page comes up. How do I:

1) get the number to appear on the "thank you" page, and

2) give the individual the ability to quit before completing the form, but come back later and pick up where they left off?

Thanks, as always.

Posted

One way would be to divide the Survey into a number of pages and have a menu of pages after the user logs-in.

Another way is to have the user, either enter their CaseNumber, or create a new case. If a CaseNumber is entered search the database for the survey (-find). Then present the survey with entered data (using <input type="text" name="question123" value="[FMP-Field:question123]">). Use a (-edit) for the submission of this Form.

The initial "Thank You" page can use [FMP-Field: CaseNumber] to display after the survey has been submitted with a "-new".

Good Luck.

Garry

  • 2 weeks later...
Posted

I still need a little help on this one.There are 7 sections to the questionnaire, so I broke it down into 7 pages. I set up an opening page with a brief explanation and two buttons. Click one button and it takes you to a page where you create a new file. That one works well enough to get there, but how do I tell it to use the same Case Number when switching to the next page (section)?

The second button takes you to a search page. Enter the Case Number, and bingo, it brings up the Case Number you want to work with showing on the Menu page. That works fine too. Now comes the part where I'm lost. On the menu page will be a link for each of the 7 sections, so the individual can go to any section they need to edit or enter data. How do I match up the Case Number on each of the 7 pages with the number on the Menu page?

I'm sorry if this seems obvious, I'm not a programmer, so it takes a while for all this to sink in and make sense.

Posted

Re: That one works well enough to get there, but how do I tell it to use the same Case Number when switching to the next page (section)?

You can use a Token to do this:

<input type="hidden" name="-token" value="[FMP-Field: CaseNum]">

I guess a few questions need to be asked:

1. Is this for a returning user?

2. If a new user are you giving them the option of continuing after the they register?

3. Are you using a menu page to access each of the sections/pages?

All the best.

Garry

Posted

Garry's Q's will help you determine the best way of proceeding to plan your particular system, but if you need some background info, here are a few general concepts to keep in mind...

-- once the record is created the first time using -new, you will only be doing -edit from then on, whether the student is answering a seciton for the 1st time or going back days later to change an answer; there is, after all, just one record... what you're doing is just showing certain parts of it at time on different web pages and hiding the rest

-- once a record has been found (uniquely), the [FMP-CurrentRecID] tag will let you to continue to -edit the same record page after consecutive page without having to perform another search as long as you do not perform a different FMP action (like perform a new -find).

-- tokens can be used to "remember" things and are especially helpful when jumping around or checking/validating situations, modes, or values; they must be renewed on every page, though, or you lose them

Now, depending upon how you answer Garry, there are different ways to proceed. Hope this helps some, though!

--ST

Posted

This is a questionnaire used by researchers doing personal interviews. After they have completed the interview, they will go to a computer and enter the data they have gathered on a paper form into the database. It is an extremely long questionnaire, with many open ended questions, so it is quite probable that they will need to stop part way through the data entry process and return later to finish it.

The first page - the opening page is the one they will use when they start a new case. When they finish the first page (or first section) and press the submit button, I have them automatically go to the next page. However, I want this to be a continuation of the Case Number they just started, and continue from page to page until they are completely finished, or until they stop and close their browser--each page opening and including the Case Number already established.

The second page is the one with the menu. This is for researchers returning to either complete a form they already started, or to edit one previously completed. They will have the Case Number, which was established in the first round. On the menu will be links to all 7 sections. I need them to enter a Case Number, then be able to go to any of the 7 sections and recall that section for the Case Number they entered.

Does that help to understand the process on this end?

Posted

Is the Case Number generated before the first page is completed, or is it only after the first page is Submitted?

The user will have to enter the CaseNumber when they return. Hence, a "-find" can occur with the page/section selected from the menu. The menu is the returned Format page, when that page/section is submitted, with "-edit". The CaseNumber is passed back to the Menu page with "[FMP-Field:CaseNUmber]".

The question maybe: How do I have a User enter a CaseNumber on arrival and also auto-enter the CaseNumber whenever the menu is returned after a page/section is edited.

All the best.

Garry

Posted

The only way I could figure to make it create the Case Number AND require a password was to create the Opening page, with links that take the user to either the New Record page or the Edit Record page.

If they go to the New Record page, the Case Number is created when the form is opened and the new record created.

(Theoretically)On the Edit Record page, there is a field for the user to enter the Case Number (it was established when they created the record earlier, and if they followed instructions, it is written on their paper form), then they click a Search button. This should bring up a third window which displays the case number and has a link to each of the 7 sections. Here they will choose the section they want to work on, and that section will open, displaying the Case Number (I have a field for Case Number at the top of each section so they will know they are working on the correct record). They can then either edit existing data, or continue entering data on that section.

I'm about ready to give up on the multi-page format and just use one form. If I can get the form to open, requiring a password and autoentering a Case Number, I'll be happy. I'd prefer to go by sections, but this is wearing me down. It is so frustrating to keep battling uphill all the time. I've been at this all day and all evening for months now. With every situation I learn more, and I'm getting better, but sometimes it can seem so overpowering. Forgive me, I'm just very tired.

Posted

I'm not sure where the problem exists!

Lets assume a login page: CaseNumber and password (if first time, a survey record is created)

If OK load menu page which has seven links to the various sections:

<a href="FMPro?-db=surveys.fp5&-format=pagex.html&casenumber=[FMP-Field:CaseNumber]&-find">Page x</a>

Is your problem with the login. Should this either find a record or create a record then go to the menu page?

If this is where the problem exists we can write a very simple login process here.

Good Luck.

Garry

This topic is 7646 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.