Description
Returns the HTML markup for a select-char given a list of names. Characters not appearing as a first letter will be rendered inactive.
Parameters7
| Coding name |
names
|
| Description |
The list of names, an array of strings.
|
| Position |
1
|
| Type |
Array(Primitive type)
|
| Comments |
No need to make it unique, the function does that.
|
| Coding name |
id
|
| Description |
The id of the element.
|
| Position |
3
|
| Type |
|
| Introduced in |
Topincs 9.0.0
|
| Coding name |
tag
|
| Description |
The tag of the child elements representing the individual characters.
|
| Position |
4
|
| Type |
|
| Default value |
span
|
| Introduced in |
Topincs 9.0.0
|
| Coding name |
range
|
| Description |
The range of the characters.
|
| Position |
5
|
| Type |
|
| Default value |
From A-Z.
|
| Introduced in |
Topincs 9.0.0
|
| Coding name |
uppercase
|
| Description |
Whether given names are uppercased.
|
| Position |
6
|
| Type |
Boolean(Primitive type)
|
| Default value |
true
|
| Introduced in |
Topincs 9.0.0
|
| Coding name |
nodes
|
| Description |
A selector
|
| Position |
7
|
| Type |
|
| Default value |
null
|
| Introduced in |
Topincs 9.0.0
|
Examples2
[%$names = ["Jane", "John", "Kevin", "Anna", ...];
echo select_char($names, id: "sc-people");%]
[%$zip_codes = ["55296", "88129", ...];
echo select_char($zip_codes, range: range("0", "9"));%]
|