I’m probably missing something very stupid but can’t seem to put my finger on it
Any extra eyes are appreciated
I defined a structure on the site.yml and I want to call it in a dropdown.
Dropdown stays empty
My site.yml
extraFormElements:
type: structure
label: Extra form elements
fields:
name:
type: text
label: What?
The dropdown:
relatedForm:
label: Link to form
type: select
query: site.extraFormElements.toStructure
And also tried:
relatedForm:
label: Link to form
type: select
query:
fetch: site.extraFormElements.toStructure
text: "{{ structureItem.name }}"
value: "{{ structureItem.name }}"
Next step is to show a text field based on the fact that you selected something in the dropdown. I know you can do a when on the dropdown value but can you also do a when to check if something (doesn’t matter what) is selected or not?
relatedForm:
label: Link to form
type: select
options: query # This line is missing
query:
fetch: site.extraFormElements.toStructure
text: "{{ structureItem.name }}"
value: "{{ structureItem.name }}"
It doesn’t detect as a change so “unselectable”
Very strange behaviour. It’s an simple plainkit setup. No special stuff or even plugins. The most special thing here is what I mentioned above. I’m thinking it might be a bug but I have no idea what I did to trigger it
3.4.3 indeed strange thing happened in the meanwhile though. I’ve tried almost everything. As a last resort I created a new structure on a page instead of the site and used find, that worked. I switched it back to exactly the same code in this post and now it works … it’s exactly the same (github agreed, and all of the sudden it works … very strange stuff, that’s a day lost I will never get back in my life )