4

I would like to have a set of questions on one page then send them to a new page where I will ask for their contact information.

However this results in two separate entries in the entries database. One for the questions form and one for the contact information.

Is there a way to connect the forms or at least identify which contact information goes with which set of answers in the entries database?

1

I am a developer for Cognito Forms.

We are releasing support for multi-page forms with conditional branching rules later this month. In the interim, you can use fields and sections that are conditionally visible to accomplish similar behavior.

Here is how the multi-page feature will appear in the builder and on your forms:

Builder - Progress Bar Settings

enter image description here

Builder - Page Break Settings

enter image description here

Form with Multiple Pages

enter image description here

Optionally, when multi-page forms are not sufficient, it is possible to transfer data from one form on one page to another form on a different page as long as you are embedding these forms on your website and are prepared to roll up your sleeves a bit:

  1. Create the first form and embed it on a page in your site.

  2. Configure the first form to send data to the second page on your website using querystring parameters:

enter image description here

Pass whatever parameters you need and reference fields on your form in []'s, such as https://www.yourownwebsite.abc/page2?First=[Name.First]&Last=[Name.Last] from the above example.

  1. Create your second form starting with a copy of the first (so it contains the same fields) and mark these fields as Show This Field - Internally so they do not appear to the user.

  2. Embed the second form on the second page using the Cognito Forms embed code.

  3. Modify the embed code to pass in information from the first form pulled from the querystring parameters.

<div class="cognito">
<script src="https://services.cognitoforms.com/include/required"></script>
<script src="https://services.cognitoforms.com/session/script/a205f58a-e405-4edb-9c3b-b4f3f5ff1d85"></script>
<script>

  // Source: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
  function getParameterByName(name) {
      name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
      var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
      results = regex.exec(location.search);
      return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));  
  }

  // Load form prefilling with querystring parameters
  Cognito.load("forms", { 
      id: "12", // make sure this is the correct form id for your form
      entry: {
          Name: {
              First: getParameterByName("First"),
              Last: getParameterByName("Last"),
          }
      }
  });
</script>
</div>

The requires a bit of effort but works with only a small bit of JavaScript. If you need to understand the syntax for specifying the entry option, you can configure your second form to post to a url on http://requestb.in/ and submit a test entry.

Optionally, if you prefer more control and can do some server-side programming, the Post to a website option can post the JSON for the first form to the second page, where you can simply pass it through to the second form in a similar fashion.

| improve this answer | |
  • Thanks for your response this looks like a great feature however it's not what I was looking for. I would like to use the marketing strategy of micro commitments. Here is how... On the first page of my website I ask a few questions When these questions are answered the visitor is forwarded to a second page of my website (Not to a second page of a form). On the second page of my website I will ask the visitor to input their contact information. I want to do it like this so the visitor becomes engaged and feels comfortable answering questions and is ready by page 2 to submit their contact in – user82993 Dec 13 '14 at 20:12
  • [con't] information. (ideally I'd like to do this across several pages of my website) Each form will be revealed on a time delay below a video presentation SO, my problem is the two will be separate entities in the Cognito entries panel and I will have no way of identifying which contact info from page 2 goes with which set of answers on page one. I basically need a way to know which contact answered which questions. – jonsca Dec 13 '14 at 21:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.