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

Mavitm
Mavitm

Hi I want to use Settings controller on my project as extend it to my Plugin file. I have to add dynamically form fields here. That's why I used code like below.

<?php
use System\Controllers\Settings as SettingsController;
class Plugin extends PluginBase
{
    public function boot()
    {
             SettingsController::extendFormFields(function($widget){
                if($widget->model instanceof MySettingsModel)
                {
                    $widget->addTabFields(...);
                }
            });
     }
}

But I get some error like below;

Call to undefined method System\Controllers\Settings::extendFormFields()
/var/www/myproject/vendor/october/rain/src/Extension/ExtendableTrait.php line 495

If there is other way or have any solution, can you inform me about this.

Last updated

Publipresse
Publipresse

Hello,

I have the same problem, did you find a solution ?

Best regards,

1-2 of 2

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