Override XML File

by jonboy   Last Updated September 30, 2019 10:10 AM - source

Using Joomla 3.9.11 and SP Simple Portfolio

When adding a portfolio item via the back end there is a description textarea field, this is required. I'd like to remove this required attribute.

Looking at the code I can see that in this location

administrator\components\com_spsimpleportfolio\models\forms\item.xml

There is the following code;

<?xml version="1.0" encoding="UTF-8"?>
<form>
    <fieldset name="basic">
        <field name="id" type="hidden" />
        <field name="title" type="text" label="JGLOBAL_TITLE" description="JFIELD_TITLE_DESC" class="input-large-text" size="40" required="true" />
        <field id="alias" name="alias" type="text" label="JFIELD_ALIAS_LABEL" description="JFIELD_ALIAS_DESC" hint="JFIELD_ALIAS_PLACEHOLDER" size="40" />
        <field name="image" type="media" label="COM_SPSIMPLEPORTFOLIO_ITEMS_IMAGE_LABEL" description="COM_SPSIMPLEPORTFOLIO_ITEMS_IMAGE_DESC" required="true" />
        <field name="video" type="url" label="COM_SPSIMPLEPORTFOLIO_ITEMS_VIDEO_LABEL" description="COM_SPSIMPLEPORTFOLIO_ITEMS_VIDEO_DESC" />
        <field name="url" type="text" label="COM_SPSIMPLEPORTFOLIO_ITEMS_URL_LABEL" description="COM_SPSIMPLEPORTFOLIO_ITEMS_URL_DESC" />
        <field name="description" label="COM_SPSIMPLEPORTFOLIO_ITEMS_DESCRIPTION_LABEL" type="editor" required="true" filter="JComponentHelper::filterText" buttons="true" />
    </fieldset>
</form>

I know that by removing the required="true" will work, but if I update the component I'll lose this?

How can I override description field so that it's not required and remains after upgrading the component?



Related Questions


Disabling Joomla Unique Email Functionality

Updated May 25, 2015 22:04 PM

Overriding com_users component

Updated May 22, 2015 21:04 PM

How to tell if the file can be overridden?

Updated October 15, 2019 11:10 AM

Joomla login redirect URL issue

Updated March 03, 2019 20:10 PM