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
    
            
            
                    
                                            
        
    
        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 495If there is other way or have any solution, can you inform me about this.
Last updated
1-2 of 2