This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I don't understand where can I add this property.
This is for a partial and a repeater. Thank you.
The repeater
type should be added to the jsonable property automatically.
Can you show me the desired form field definitions you are wanting? This will help us understand why it doesn't work.
Works with repeater. I want this for nested fields with array syntax as the documentation says (contact[name], contact[email], etc.) but where can I add that function?
\Cms\Models\ThemeData::extend(function ($model) {
$model->addJsonable('contact');
});
You can add this code to your plugin registration file in the boot
method. Check out the documentation for more details:
https://octobercms.com/docs/plugin/registration#registration-methods
In terms of being a standalone theme, consider using contact_name
and contact_email
instead. Is there a reason that it must be nested inside an array?
1-4 of 4