1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +00:00

Update SelectWidget.tid (#5555)

Added instrux for placeholder value. [Ref.](https://github.com/Jermolene/TiddlyWiki5/issues/5544)
This commit is contained in:
twMat 2021-03-20 23:43:35 +01:00 committed by GitHub
parent 743d9c56c0
commit 99bef2614c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,17 @@ This example sets the title of the current wiki [[$:/SiteTitle]] to one of a lis
<option>The Dice Man</option>
</$select>"/>
!!! Simple List with Placeholder Value
To display a default value that is also disabled, effectively functioning as a placeholder, this form can be used:
<$macrocall $name="wikitext-example-without-html" src="<$select tiddler="$:/SiteTitle" default="Choose a new site title">
<option disabled>Choose a new site title</option>
<option>A Tale of Two Cities</option>
<option>A New Kind of Science</option>
<option>The Dice Man</option>
</$select>"/>
!! Value lists
In this example the `value` attribute has been used to specify the text that should be used as the value of the entry instead of the display text.
@ -117,4 +128,4 @@ This example uses the `multiple` keyword to specify that we should be able to se
<$list filter='[list[$:/generated-list-demo-state!!testing]]'>
<$view field='title' /><br />
</$list>
"/>
"/>