Creating a form
Now we need to create the JForm that Joomla! will use to load this data. This is just an XML file that defines the fields we are going to use on our form.
The form XML file
Create the folder forms
in your model folder, then create the file /administrator/components/com_folio/models/forms/folio.xml
. Don't forget to include an index.html
file in this new folder.
<?xml version="1.0" encoding="utf-8"?> <form> <fieldset> <field name="id" type="text" default="0" label="JGLOBAL_FIELD_ID_LABEL" readonly="true" class="readonly" description="JGLOBAL_FIELD_ID_DESC"/> <field name="title" type="text" class="inputbox" size="40" label="JGLOBAL_TITLE" description="COM_FOLIO_FIELD_TITLE_DESC" required="true" /> <field name="alias" type="text" class="inputbox" size="40" label="JFIELD_ALIAS_LABEL" description="COM_FOLIO_FIELD_ALIAS_DESC" /> </fieldset> </form>
The first line just says this is...