0

I know how to create a custom form field if I am building a module/component/plugin but how do I build one of the Joomla! custom fields?

I can't find a tutorial and I think I'm probably Googling the wrong thing (disclaimer: other search engines are available... kind of)

1 Answer 1

3

I think you might be right there aren't direct official tutorials on this. But in the Joomla! documentation there is a hint.

A developer focused pdf from the creator of custom fields Allon Moritz called DPFields at this time and merged into Joomla! 3.7

https://joomla.digital-peak.com/images/blog/JDD16%20Custom%20fields%20in%20Joomla%20for%20developers.pdf

And another link on the official Joomla! documentation: https://docs.joomla.org/J3.x:Adding_custom_fields/Implement_into_your_component

6
  • 1
    Also, if you're wanting to implement custom fields in your own component, then there's a tutorial step at docs.joomla.org/J3.x:Developing_an_MVC_Component/… Commented Sep 19, 2020 at 21:57
  • Thanks @alexandreelise are you saying that for com_content I should just be adding it to this area: components/com_content/layouts/field/prepare/foo.php because it is a custom custom field it won't be ovewritten by the core.
    – Eoin
    Commented Sep 21, 2020 at 9:13
  • 1
    @Eoin it would be better to base your code on actual core custom fields and learn from the core custom. The simplest one is text field in JPATH_ROOT/plugins/fields/text learn from that one first then learn from other fields in the plugins fields group Commented Sep 21, 2020 at 15:14
  • 2
    In the final release of version 3.7 the fields got migrated to plugins.
    – Laoneo
    Commented Sep 28, 2020 at 15:16
  • Thanks @Laoneo so then I would simply duplicate a plugin and stat to write my own from there? Is it just the plugin folder I need to duplicate? It seemed like quite a lot more than that.
    – Eoin
    Commented Mar 12, 2021 at 13:14

Your Answer

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

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