Creating a custom form field type

From Joomla! Documentation

Set up base class is not neccessary. I have implemented custom list field using JFormField as parent class. No need for class like specified in step 2, just write our getInput() or getOptions().

- Mrs.siam

When creating a custom field for a front-end component ( /administrator/components/<component>/views/<view>/tmpl/<layout>.xml ) I was unable to use the custom field until I added the field path to my <fieldset>

<fieldset addfieldpath="/administrator/components/<component>/models/fields" ...>
	<field name="foo" type="customFieldName" ... />

I don't know where else this would be required, ie: if it's required when using /administrator/components/<component>/models/forms/<whatever>.xml.

I also don't know if there is an alternative to using addfieldpath.

Drewgg 12:14, 30 May 2012 (CDT) Drewgg