And use this to make the "Hunt URL" field optional (since some hunts
might not have any URL).
"blocks": [
input_block("Hunt name", "name", "Name of the hunt"),
input_block("Hunt ID", "slug", "Short hunt prefix (no spaces)"),
- input_block("Hunt URL", "url", "External URL of hunt")
+ input_block("Hunt URL", "url", "External URL of hunt",
+ optional=True)
],
}
"value": name
}
-def input_block(label, name, placeholder):
+def input_block(label, name, placeholder, optional=False):
return {
"type": "input",
"block_id": name,
+ "optional": optional,
"element": {
"type": "plain_text_input",
"action_id": name,