Custom List Field within Builder Plugin

I am using the kirby builder plugin
and I want to include the list field
My issue is, that I only can add one item.

My code looks like this for the module:

<div class="section">
	<p class="sectionHeader sans-xs-b"><?= $data->moduleintro()->kt() ?></p>
	<ul class="sectionList sans-xs">
		<?php foreach($data->modulelist()->toStructure() as $term): ?>
			<li><?= $data->modulelist($term) ?></li>
	  	<?php endforeach ?>

So maybe anyone has an idea how to solve this.

Thanks for any help :pray:

I’d love to help you but I don’t understand what exactly does not work as expected. What is $data what is the modulelist field. What has the code to do with the fact that you can only add one item (in the Panel, I guess?).

Please also post your blueprint.

Sorry for this.

The custom list module displays only one input field (of the list) in the builder module. That means I can’t really create a list. I think it’s because of the builder plugin and I didn’t integrate it properly.

my blueprint looks like this:

    label: Sections
    type: builder
        label: ListModule
        snippet: sections/listmodule
	            label: Intro Text
	            type: textarea
			    label: Services
			    type: list

Should work, though. Once you add an item, a new input field should appear.

Make sure that your indentation is correct and better use spaces then tabs. Looks like you have mixed tabs and spaces and the indentation is also not correct if I copy the above code into a blueprint.

okay. The problem was that the indentation wasnt correct.
Thanks again @texnixe !!