Skip to content

Commit

Permalink
Update example DAG and documentation to illustrate the use of a multi…
Browse files Browse the repository at this point in the history
…line text Param
  • Loading branch information
sc-anssi committed Sep 9, 2024
1 parent 9e5858b commit 8bfc7b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions airflow/example_dags/example_params_ui_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
title="Time Picker",
description="Please select a time, use the button on the left for a pop-up tool.",
),
"multiline_text": Param(
"A multiline text Param\nthat will keep the newline\ncharacters in its value.",
description="This field allows for multiline text input. The returned value will be a single with newline (\\n) characters kept intact.",
type=["string", "null"],
format="multiline",
),
# Fields can be required or not. If the defined fields are typed they are getting required by default
# (else they would not pass JSON schema validation) - to make typed fields optional you must
# permit the optional "null" type.
Expand Down
3 changes: 2 additions & 1 deletion docs/apache-airflow/core-concepts/params.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,15 @@ The following features are supported in the Trigger UI Form:
- Example

* - ``string``
- Generates a single-line text box to edit text.
- Generates a single-line text box or a text area to edit text.
- * ``minLength``: Minimum text length
* ``maxLength``: Maximum text length
* | ``format="date"``: Generate a date-picker
| with calendar pop-up
* | ``format="date-time"``: Generate a date and
| time-picker with calendar pop-up
* ``format="time"``: Generate a time-picker
* ``format="multiline"``: Generate a multiline textarea
* | ``enum=["a", "b", "c"]``: Generates a
| drop-down select list for scalar values.
| As of JSON validation, a value must be
Expand Down

0 comments on commit 8bfc7b3

Please sign in to comment.