Create Fixed Dynamic Forms
Fixed dynamic forms use values that are hard-coded in the paragraph code to generate the dynamic form.
The structure for the dynamic form is ${my-form-info}
. On execution,
the placeholders in the code will be replaced with the custom user input in the
respective input fields.
The following input fields are currently supported:
- Use Textbox to input any string of
characters.
${<name>(<label>)=<default_value>}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.label
: The label that is displayed on top of the dynamic form. A customized label can be specified using${name (myLabel)}
.default_value
(optional): The default value that is given to the dynamic form when it is first created.
For example:
%md My name is ${textbox(Title of textbox)=Graph Studio}
- Use Select to choose a value from a drop-down
list.
${<name>(<label>)=<default_value>,<option_value_a>(<option_label_a>)|<option_value_b>(<option_label_b>)}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.default_value
(optional): The default value that is given to the dynamic form when it is first created. It must be one of the option values.- An option comprises
option_value
andoption_label
. Theoption_value
is used to reference whichdefault_value
should be selected, and the (optional)option_label
is displayed in the dropdown list or in respective boxes created by a checkbox. - An
option_value
can be either a string or a numeric value. - Options are separated with the
|
character in parsed forms.
- An option comprises
For example:
%md Country: ${country=US,US(United States)|UK|JP}
- Use Multiple Select to select one or multiple values from a
list.
${selectMultiple(<join_parameter>):<name>(<label>)=<default_value>,<option_value_a>(<option_label_a>)|<option_value_b>(<option_label_b>)}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.label
: The label that is displayed on top of the dynamic form.default_value
(optional): The default value that is given to the dynamic form when it is first created. It must be one of the option values.- An option comprises
option_value
andoption_label
. Theoption_value
is used to reference whichdefault_value
should be selected, and the (optional)option_label
is displayed in the dropdown list. - An
option_value
can be either a string or a numeric value. - Options are separated with the
|
character in parsed forms.
- An option comprises
join_parameter
: The value that will be inserted between multiple selected values. For instance, consider that a Multiple Select dynamic form having two elementsA
andB
with a join parameter ofor
. If the user selects bothA
andB
and runs the paragraph, then the result will beA or B
.
For example:
${selectMultiple(OR):country=US|JP, US(United States)|UK|JP}
- Use Slider to select within a specified
range.
%md ${slider(<minimum>,<maximum>,<step_size>):<name>(<label>)=<default_value>}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.minimum
: The minimum value of the slider. Must be a number.maximum
: The maximum value of the slider. Must be a number.step_size
: The step size of the slider. Must be a number and divider of (maximum - minimum).default_value
(optional): The default value that is given to the dynamic form when it is first created (minimum <= default_value <= maximum
).
For example:
%md My age is: ${slider(18.0,30.0,5.0):My Age=25.0}
- Use Checkbox to select one or more specified
values.
${checkbox(<join_parameter>):<name>(<label>)=<default_value>,<option_value_a>(<option_label_a>)|<option_value_b>(<option_label_b>)}
In the preceding code:
name:
The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.default_value
(optional): The default value that is given to the dynamic form when it is first created. It must be one of the option values.- An option comprises
option_value
andoption_label
. Theoption_value
is used to reference whichdefault_value
should be selected, and the (optional)option_label
is displayed in the dropdown list or in respective boxes created by a checkbox. - An
option_value
can be either a string or a numeric value. - Options are separated with the
|
character in parsed forms.
- An option comprises
join_parameter
: The value that will be inserted between multiple selected values. For instance, consider that a Checkbox dynamic form having two elementsA
andB
with a join parameter ofor
. If the user selects the checkbox for bothA
andB
and runs the paragraph, then the result will beA or B
.
For example:
%md ${checkbox( or ):country(Country)=US|JP, US(United States)|UK|JP}
- Use Date Picker to select a
date.
${date(<date_format>):<name>(<label>)=<default_value>}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.date_format
(optional, recommended): The date format that is used for displaying the selected date in the input field and for formatting the resulting date when the paragraph is run.default_value
(optional): The default value that is given to the dynamic form when it is first created. It must be specified according to thedate_format
or inyyyy-MM-dd
format if thedate_format
is not provided.
For example:
%md ${date(EEEE):myName(my-label)=1994-06-15T09:00:00}
- Use Time Picker to select a
time.
${time(<time_format>):<name>(<label>)=T13:30}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.time_format
(optional, recommended): The time format that is used for displaying the selected time in the input field and for formatting the resulting time when the paragraph is run.
For example:
%md ${time(hh:mm:ss):myName(my-label)=1994-06-15T09:00:00}
- Use DateTime Picker to select one or more specified
values.
${dateTime(<dateTime_format>):<name>(<label>)=<default_value>}
In the preceding code:
name
: The name of the dynamic form. It is displayed on top of the dynamic form. If you want to reference a dynamic form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.dateTime_format
(optional, recommended): ThedateTime
format that is used for displaying the selected date and time in the input field and for formatting the resulting date and time when the paragraph is run.default_value
(optional): The default value that is given to the dynamic form when it is first created. It must be specified according to thedateTime_format
or inyyyy-MM-dd HH:mm
format if thedateTime_format
is not provided.
For example:
%md ${dateTime(YYYY-M-dd hh:mm:ss):myName(my-label)=1995-06-15T09:00:00}