I know well how to create custom form field in joomla module settings as written in the accepted answer of this question which is basically extending JFormField class.

Now what i want to do is suppose there is a custom form field type "unique id" in module's settings page in admin panel, user of the module puts some value in the textbox of this field, and when module settings is saved then that field with value is included in the param field in database table(#_modules) for this module.

But what i want is that i want to save that field value in another table. Look like i need to override some classes when module settngs data is saved, so for this i need quick help or what other ways i can achieve that ? FYI i just don't want to put a form in module at front end to get input for that field from user, i want to do that from module settings page in admin panel which i guess is logical. Thanks in advance for saving my time.

  • You'd need a plugin to listen to a module save event, eg. joomla.stackexchange.com/questions/14404/… – jamesgarrett Apr 14 '17 at 1:38
  • well that is a another plugin headache, I don't want another plugin for this simple task – dev-m Apr 14 '17 at 11:50
  • can't i override specific classes which responsible for saving module data? this way of overriding not possible to use from module? – dev-m Apr 14 '17 at 16:17
  • 1
    you can't override core classes without using one of the experimental plugins which allow it - which would increase the complexity substantially. You could also write your own component and thus have the capacity to override the save method. This would also be much harder than writing a plugin. – jamesgarrett Apr 15 '17 at 1:23
  • I was thinking to save that field value in another table from the module's custom field element classes which extends JFormField class as we know. but the problem is if the user clicks 'save' button only in module settings page and there are other checking problems. So is look like there is no alternative besides putting a form at module front end to take that field input. – dev-m Apr 26 '17 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.