1

I have created a module.

Now, when someone visits the DB page, I want to show some information from database. How should I do that? It seems I cannot find any relevant article in Joomla's site.

Update:

I go the module's setting page in the administration. Well, there are certain number of fields which I had declared in the *.xml file of the module. Now, in the same page, beside those fields, I want to add some HTML and some information, too. These information must be read from the DB. Now I do not see any place to do this. How can I connect to DB and fetch data right in the setting page of a module under the administration.

2
  • What is the DB page? And please try to be more specific about what you are trying to do. Is it finally in the backend of the module? Is it a field that you want to populate with db data?
    – FFrewin
    Jun 21, 2016 at 10:17
  • @FFrewin I have updated the question. Jun 21, 2016 at 11:30

1 Answer 1

1

For this, you can go with a custom form field type

In your form field, you can interact the way you want with the database and have your results printed in the module's admin panel.

Perhaps you could simply create an override over an already existing form field type, if you find any that is close to what you want to achieve and that you don't use it already in other ways in your module.

For example, if you place the corresponding php file of the form field type, inside your module's models/fields/ folder, you can override it and this override will work for your module only.

1
  • @MostafaTalebi, you are welcome and I m glad that I helped you.
    – FFrewin
    Jun 22, 2016 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.