I am trying to build a select field in a project that feeds from the values of an array in config.php.
This works also so far. But why are the label values stored in the .txt file of the project and not the values?
Or: Why does my select field in the values also get the capitalized texts?
config.php
'technique-map' => [
'malerei' => 'Malerei',
'zeichnung' => 'Zeichnung',
'mischtechnik' => 'Mischtechnik',
'monotypie' => 'Monotypie',
'digital' => 'digital'
],
project.yml
technique:
label: Technik
type: select
options: query
query: kirby.option("technique-map")
HTML-Output in the panel:
<select id="1273" name="technique" class="k-select-input-native">
<option value=""> — </option>
<option value="Malerei"> Malerei </option>
<option value="Zeichnung"> Zeichnung </option>
<option value="Mischtechnik"> Mischtechnik </option>
<option value="Monotypie"> Monotypie </option>
<option value="digital"> digital </option>
</select>
Theoretically, I can work with it. But what I actually hoped for is to have the possibility to change the descriptions of the values later if necessary.
So now it is like this:
malerei => Malerei
But in the future I might want to rename it to
malerei => Malerei mit Pinsel
For this i hoped to store “malerei” into my project.txt and not “Malerei”
Or how can I solve this differently so that I can conveniently rename categories of a select field later without having to reassign my projects?
Thanks for any help!