Using a Picklist of Options in a Blueprint
Let users choose from a fixed set of values when creating a page or space from a Blueprint.
In addition to user-entered text and file attachments, you can now use a picklist of options inside the Blueprint Wizard. This is a great way to further control the output of a blueprint, and provide greater ease-of-use to your content creators. This guide describes how to set up picklist of options.
Create your Page Blueprint
Learn about creating a Page Blueprint. Use a substitution field in the place where you want your user's picklist selection to go. For example, let's say our Blueprint is an Employee Profile page and we want users to select from a given list of titles. We might then add a [[employee-title]]
substitution field under their name and image on the blueprint.
Access your Blueprint JSON Definition
Read more about Accessing and Editing the JSON File.
Set the "type" to "list", and add the "values" attribute to the blueprintField object
Add a new line to your Blueprint Field object definition, as seen in the code snippet below. The values for the "values" attribute will be the options displayed to the user. This is an array of items in quotations. Inside the quotes can be any set of characters including special characters, but note that you may need to "escape" slashes, apostrophes, and quotations using a "\" character in front of it.
"blueprintFields" : [ { "id" : "employee-title", "name" : "Employee Title", "type" : "list", "required" : true, "helpText" : "Select an employee title from the list.", "values" : [ "Magician", "Pipe Fitter", "Systems Analyst", "Knacker", "Shark Tamer", "Saxophonist", "Other" ], }, ... ]
Re-Upload your JSON to the Blueprint Definition Page
That's It!
Test your Blueprint by creating a page from it. The options shown should be those defined in the "values" array (in our example: "Magician", "Pipe Fitter", etc.). The selected option should display on your page wherever its substitution field was placed.
If using:
- Replace me with something to note about this how-to entry that falls outside the scope of all other sections; and
- Add the tight-bottom class to the Steps block above to narrow the gap between the two blocks.