Hello, I’m using the Kirby List Field inside of the Kirby Engineer Field. With the code I have written, if I put more than one item in the list field the output is “projects/example-project-1 yaml”. Putting just one list item outputs the correct content. What am I doing wrong here?
projectteam:
label: Project Team
type: engineer
fields:
role:
label: Collaborator Role
type: text
width: 1/2
name:
label: Collaborator Name
type: list
placeholder: Add a collaborator
width: 1/2
Yes, that looks perfectly ok. But that doesn’t show me where it echoes the URL of the page if you loop through. it. A field always contain the page information, but that is not echoed.
Of the built in fields: a simple text field, a tags field
Unfortunately, I’m not aware of plugin that compares to the list field but stores a comma separated list instead. Modifying the list field to store a comma separated list would be an option. If your collaborators are stored anywhere, a multi-select field could also be an option.
The List Plugin is much more suitable from a UI perspective for the client. So I want to attempt to add the comma. However, PHP is not my strong point. Can it be just as simple as concatenating a comma somewhere in this following function?
No, I think you have to make changes to the result and value methods, where one is responsible for what. is stored and. the other for what is. read again from file. But not sure if it. needs some other adjustments as well. You’d. have to look into what is inherited from the parent methods.