Skip to main content

Forms

Overview

Forms used inside JomDirectory are XML based so can easily be edited.

Location of the XML files:
components/com_jomdirectory/models/forms

Each file name describes where is being used in the component front-end e.g. addreviews.xml is used for adding a review under item view.

Edit

You can edit these files and insert more fields if needed. There are Joomla based field types: text, text area, radio etc. Please read Joomla documentation for more types.

For each new field, a database column needs to be created.

Display

Form fields are being parsed by the model to the template file e.g. views/item/default.php

To display the field, use this schema:

<?php echo $this->form->getLabel('title'); ?>
<?php echo $this->form->getInput('title'); ?>