In Service Broker, you can customize the request form for imported blueprints or templates that include input parameters. Input parameters allow the user requesting a catalog item to provide the values. You can customize how the custom options are presented in the form.

WordPress blueprint is used as the example in this use case. If you don't customize the request form, it is a simple list of parameters. See the following example.

Default WordPress request form.

In this use case, you customize the following options:

  • Reduce the maximum number of WordPress Cluster Size from 5 to 3.

  • Specify operating system based on Node Size. For example, if size is small, then the operating system is coreos. If it medium, then the operating system is ubuntu.

  • Set the MySQL Data Disk Size value to 5 and hide the option from the requesting users.

Prerequisites

This use case assumes that you imported the WordPress use case blueprint from Cloud Assembly, or that you have a blueprint or template that includes input parameters.

Procedure

  1. Select Administration > Content.
  2. Locate the WordPress blueprint, select the check box, and click Customize Form.
    If the blueprint has input properties, they are listed in the Request Inputs pane on the left, and are added to the canvas.

    WordPress custom form designer canvas.

  3. Edit the form using the values provided in the following table.

    For this field in the screenshot

    Appearance

    Values

    Constraints

    WordPress Cluster Size

    Maximum value

    • Value source = Constant

    • Max value = 3

    Select Image/OS

    Default value

    • Value source = Conditional value

    • Expression =

      Set value = coreos

      If Node Size Equals small

    • Expression =

      Set value = ubuntu

      If Node Size Equals medium

    MySQL Data Disk Size

    Visibility

    • Value source = Constant

    • Visible = No

    Default value

    • Value source = Constant

    • Default value = 5

  4. Click and drag the fields to rearrange them on the form.
  5. To turn on the custom form, toggle on the Active custom form.

    Turn on the custom form.

  6. Click Save.

Results

The request form is now similar to the following example.

Customized WordPress request form.

Notice that the Wordpress Cluster Size field indicates an error. The limit is 3, but the user entered a value of 4.

What to do next

Request the item in the catalog and verify that the presentation and behavior is what you expected.