Passing parameters tutorial

Applies to Infiniti v9.1 or later

 

Overview

In this exercise we will learn how Intelledox Infiniti can place and use parameters in a URL to change the appearance and functionality of a form.
 
This guide assumes you have already completed the basic tutorial and understand the fundamentals of Infiniti.
 
We will be building 2 projects in this exercise.
 
The first project is a form which allows the creation of a unique URL depending on the information entered by the user.
The second, is a form that takes the URL and adjusts the form layout depending on the information provided in the URL.
 

Project Passing Parameters

  1. Create a New Project and call it Passing Parameters.
  2. Change the Page Name to Welcome to General Practice Medical Centre.
  3. Add a Label named Intro and enter the following as the Label Text “Please fill out the information below to customize your experience”.
  4. Add 4 Text Fields, and name them First Name, Last Name, Phone Number and eMail.
  5. Add a Multiple Choice question named “Why are you making an appointment?”. Add the Answers, General Check up, Injury, Illness and Prescription Referral; make sure all of the answers have a Display Text equal to their name.
  6. Add a Variable question. Click the Answer and call it type. In the Formula, write in “concat(“ then use  to select the multiple choice question “Why are you making an appointment” and close the bracket. It will look something like this, concat([6]).
     
    The formula concat() concatenates all the information inside its brackets. In this case it is concatenating all the selected answers from our multiple choice question.
     
  7. Save this project and Publish it.

 

Project Receiving Parameters

  1. Create a new project called Receiving Parameters
  2. Add a New Page above New Page 1 and call it hidden.
  3. In hidden, add the Labels 'fname,' 'lname,' 'pnumber,' 'email,' and 'type.' Make sure all of them have Visible unchecked.
  4. Click on the answer on each label and click on Answer File Properties arrow to bring down an option menu. Click save to answer file and choose Save by unique label. In the text field underneath save by unique label, type in the name of the question you are referencing. Do this for all of them.
            
            
 
While the name of the label is unimportant, the save by unique label name is. The unique label name is something we will be using to reference a value from the URL. If it does not reference anything, then it will return as an empty value.
 
 
  • Rename New Page 1 to Book an appointment
  • Add a Section and name it Your contact details. Add a column
  • Add 4 labels, name them First Name, Last Name, Phone Number, and Email. Change Name Positon to Top. In the text use the tool to make the label text equal to the similar label above. (First name being fname)
  • Add 4 more sections. Call them General Check-up, Injury, Illness and Prescription referral. Go to conditions, make it so that General Check-up, is only active if type is equal to “General Check-up”. Do this for the other named sections. Make sure the section is only active if type is equal to its name.
  • In the General Check-up section, add a column and a label. Name the label Available Doctors and make the name position top. In the label text, type in “Doctor Albert Jones”. Add a Multiple Choice question, change the text position to (None) and change the answer name to “Book my appointment with Doctor Albert Jones”.
  • Add another label and type in “Doctor Sarah Mason”. Add a Multiple Choice question, change the text position to (None) and change the answer name to “Book my appointment with Doctor Sarah Mason”.
  • Add another label and type in “Doctor Ravie Singe”. Add a Multiple Choice question, change the text position to (None) and change the answer name to “Book my appointment with Doctor Ravie Singe”.
  • In the Injury section, add a column and a label. Name the label Available Doctors and make the name position top. In the label text, type in “Doctor Sarah Mason” Add a Multiple Choice question, change the text position to (None) and change the answer name to Book my appointment with “Doctor Sarah Mason”.
  • In the Illness section, add a column and a label. Name the label Available Doctors and make the name position top. In the label text write “no doctors available”.
  • In the Prescription section, add a column and a label. Name the label Available Doctors and make the name position top. In the label text, type in “Doctor Ravie Singe”. Add a Multiple Choice question, change the text position to (None) and change the answer name to “Book my appointment with Doctor Ravie Singe”.
  • Save this project and publish it.
 

Creating our Unique URL

  • In Manage go to Folders and click the folder you published Receiving Parameters in. Click on Receiving Parameters and find the ID, copy it down somewhere. It should look something like this
  • If you closed down Passing Parameters, open it up in design app and drag an action to finish. Make the action type Redirect and click OK.
  • Make the attribute Redirect URL and the Type and a fixed value.
We are going to edit a link to transfer values over. You may want to open up notepad or a similar text program to create the URL in.
 
Start with (assuming you are on ixtransform)
 
http://www.ixtransform.com/launch.aspx
 
If you are using something a little different than ixtransform, just change the ixtransform bit to whatever website you are currently being hosted on.
 
(Examples: http://www.ixsform.com/launch.aspx, http://www.preview.ixtransform.com/launch.aspx)
  • Next add the ID of Receiving Parameters
http://www.ixtransform.com/launch.aspx?id=(Receiving Parameters id)
  • Next we will add the extra parameters. Use the  tool to select the questions.
Go with this structure
 
http://www.ixtransform.com/launch.aspx?id=(Receiving Parameters id)&fname=(First Name)&lname=(Last Name)&pnumber=(Phone Number)&email=(email)&type=(variable question type)
 
It should look something like this once you had added all of your values
 
http://www.ixtransform.com/launch.aspx?id=52110ed9-48a9-4168-9090-0b6a0c0891a4&fname=[q2]&lname=[q3]&pnumber=[q4]&email=[q5]&type=[q7.10]
  • Add the newly created URL inside the fixed value of the action and click Add.
  • Click Save and run the project.

 

What we have achieved

When you run Passing Parameters it will give you basic text field as well as a multiple choice question. The action we have made redirects us to our Retrieving parameters project with some extra values. The labels in the hidden page take the values from the link and make them their own. All the hidden labels are doing is referencing a value from the URL. We have other labels to show what the values are and we also have a parameter which changes how the form looks.
Parameters are a very useful way to pass through data from multiple forms.

 

Related Articles

 

 

Keywords

 

pass parameter tutorial