This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

miguelcamguse
miguelcamguse

I don't understand where can I add this property.

This is for a partial and a repeater. Thank you.

daftspunky
daftspunky

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.

miguelcamguse
miguelcamguse

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');
});
daftspunky
daftspunky

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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.