Update SelectWidget.tid (#5555)

Added instrux for placeholder value. [Ref.](https://github.com/Jermolene/TiddlyWiki5/issues/5544)
tiddlywiki-com
twMat 2021-03-20 23:43:35 +01:00 zatwierdzone przez GitHub
rodzic 743d9c56c0
commit 99bef2614c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -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>
"/>
"/>