Page 1 of 1

Plugin.php options

Posted: Thu Feb 24, 2022 3:41 pm
by kamaldua
is there a way to put logic and other information in plugin.php file while creating for example when user is inputting settings for plugins I want to have a dropdown and depending on choice from drop down more dependent fields to be shown.

Example:
Is your VC Server is Secure ( jwt token) : Dropdown with Y/N
depending on what user choses want to show additional fields.

Re: Plugin.php options

Posted: Thu Feb 24, 2022 4:30 pm
by kamaldua
I think since it is PHp file, I can try with mixed html and PHP.

Re: Plugin.php options

Posted: Thu Feb 24, 2022 4:56 pm
by alfa24
Please explain. Nearly unintelligible.

Re: Plugin.php options

Posted: Sun Feb 27, 2022 5:49 pm
by kamaldua
What I mean is in Plugin.php file we can specify like following line which automatically creates a textbox for setting for Plugin and adds to database.
parent::addSetting('MypluginField','string',255,'defaultvalue');
What other options are available ? eg if I want users to select a value from dropdown or user to upload a file which will be placed in plugin folder?

Re: Plugin.php options

Posted: Sun Feb 27, 2022 6:30 pm
by alfa24
Ok, i think I caught you.
Unfortunately there is no field setting type reference. I'm sure you can use string, int, enum.
If you need further assistance, you can contact me in private.