This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
vanderb
Hi folks, for my current project I have to extend the form fields on CMS -> Pages.
I've created a small Plugin which shows the new field. This codeblock creates the custom field (I know in each backend form, but not nessesary to solve my question for now).
Event::listen('backend.form.extendFields', function($widget){ $widget->addFields([ 'custom_field' => [ 'label' => 'Custom Field', 'type' => 'text' ] ]); });
Allright, here is the big questions: How to save/update this field to the pages yaml-file?
Big thanks for helping me. Cheers.
vanderb
Ok, found out, that I've forgotten to add settings to the field key^^
$widget->addFields([ 'settings[custom_field'] => [ 'label' => 'Custom Field', 'type' => 'text' ] ]);
1-2 of 2