Passing parameters tutorial

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

Create a New Project and call it Passing Parameters.

Change the Page Name to Welcome to General Practice Medical Centre.

Add a Label named Intro and enter the following as the Label Text “Please fill out the information below to customize your experience”.

Add 4 Text Fields, and name them First Name, Last Name, Phone Number andeMail.

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.

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.

Save this project and Publish it.

Project Receiving Parameters

Create a new project called Receiving Parameters

Add a New Page above New Page 1 and call it hidden.

In hidden, add the Labels 'fname,' 'lname,' 'pnumber,' 'email,' and 'type.' Make sure all of them have Visible unchecked.

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.

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.