Create a fields plugin. extend an existing field (I was extending checkbox) within a fields folder of my new custom field. In the plugin php - use $form->addFieldPath(JPATH_PLUGINS.'/fields/yourfield/fields'); to allow the plugin to use your new field.
In /administrator - I can edit a user after creating a custom field and that field displays as expected. When I edit the profile as a user - I'm given a text field (the fallback)
This is confusing to write.... I hope I'm explaining it well enough.
addFieldPath functions in both front-end and backend
addFieldPath only functions in backend
PHP7.1.11, Nginx, MariaDB10.2.11
Labels |
Added:
?
|
Category | ⇒ | com_fields com_plugins |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-19 23:19:51 |
Closed_By | ⇒ | stutteringp0et |
I checked the result of $result = $form->addFieldPath(JPATH_PLUGINS.'/fields/myfield/fields');
The result array contains the path I added