Rakesh Singh
Rakesh Singh

Reputation: 21

Add dynamic dropdown list (populate from db) in XML file for Joomla authentication Plugin

I am implement a Joomla 3.7 customer user plugin and I have the following issue:

I want to have a drop-down list type plugin parameter where the option values are not statically provided in the plugin xml file, but they are populated dynamically from php code that grabs them from another extension via some JSONRPC api calls.

Please help me How to achieve this. Thank you

Upvotes: 1

Views: 425

Answers (1)

Josef Amalraj
Josef Amalraj

Reputation: 463

https://docs.joomla.org/Special:MyLanguage/SQL_form_field_type

<field
name="title"
type="sql"
default="10"
label="Select an article"
query="SELECT id AS value, title FROM #__content"
/>

Upvotes: 1

Related Questions