How to define and reference inputs for Project Fragments

Applies to Infiniti v8.1 or later
Product Features

It is possible to pass values into Project Fragments from their parent project.

For example, you may have a fragment that represents an Address Block. You may want to make it an option for parent projects to display a Phone Number field (for example) within the fragment.

You could build into the Address Block fragment an input that determines whether or not to show the phone number field. The parent project can then pass "true" or "false" into the fragment, to control its behavior.

In Design, when editing a fragment, there is a toolbox entry called "Inputs". To add an input, drag and drop an Input from the toolbox into the question set.


These inputs only have one property - their name, which is used to identify them. These inputs can be referenced by other elements in the project - either by selecting "Input" from the type drop down on the 'Conditions' tab; or by using a reference in the form of [Input.Show Phone Number] (if the input was called "Show Phone Number").

Defining inputs for Project Fragments

  • Go to article 'How to create and reference project fragments' to see how to create project fragments.
  • Once you have created a project fragment, you will see an Inputs node at the top under 'question set' section.
  • now right click on Inputs node under the question set to add an input.
  • Change input name to ‘Show Phone Number’ as shown in image below:
  • If you have created your fragment portion project by following the above articles’ example then you will be able to see ‘Address Details’ tab. expand this tab and add an invisible label, change the label name to ‘Phone Number’.
  • Edit template and add a new placeholder called {{phoneNumber}} under Address section. Map this placeholder to phone number label.
  • Under properties tab of label, set the default value = ‘[Input.Show Phone Number]’ as shown in image below:
  • Now go to the conditions tab and add ‘Input’ type ‘active’ condition as shown in image below:

Referencing defined inputs in a parent project

  • Edit a content type project that calls above project fragment. Go to article 'How to create and reference project fragments' to see how to add and call a project fragment into content type project.
  • Add a new user prompt before the fragment and change its question text to ‘Enter phone number’.
  • Go to the properties tab of your fragment and add ‘Show Phone Number’ input as fragment input as shown in image below:
  • ‘Enter phone number’ user prompt value will now act as an input value for ‘Show Phone Number’ input. Save changes and run your content type project.


Related Articles





define input project fragments parent