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

michael33692
michael33692

Hello,

I'm trying to extend the Page plugin by adding a few fields under a tab.

I need these fields to be translatable though. From what I get from the docs (https://octobercms.com/docs/plugin/extending#extending-backend-form), I cannot use extendFields, and I must use extendFieldsBefore instead. It correctly adds the translatable fields to the form, however, not in the correct tab (they are added in the top area, right below title and url).

Is there a way to extend a plugin backend form so that the translatable fields are placed within a choosen tab?

jordi.ctro34953
jordi.ctro34953

You can look at TranslatablePage code to find the solution. Instead of adding the new field under $widget->fields, try with $widget->tabs['fields'].

1-2 of 2

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