Question about overriding

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Tue Jan 03, 2012 1:35 pm
Hi,

I want to change the size of fields contact form.

The file to modify is located here :

../components/com_contact/models/forms/contact.xml

I want to modify the file using overriding principle.

So I try to reproduct the path into my html's template folder, but the modification of the file is not applied.

Did I miss something ?

Ryo
User avatar
Senior Boarder

teitbite
Tue Jan 03, 2012 5:27 pm
Hi

Sorry I do not understand. You would like to change the number of chars or a dimentions ?

Because if it's about dimentions than I would use css instead.
User avatar
Moderator

GK User
Tue Jan 03, 2012 6:57 pm
I want to change the width of some fields.

The code is like this :

Code: Select all
<form>
   <fieldset name="contact" addrulepath="components/com_contact/models/rules" label="COM_CONTACT_FORM_LABEL">
      <field name="contact_name"
         type="text"
         id="contact-name"
         size="30"
         description="COM_CONTACT_CONTACT_EMAIL_NAME_DESC"
         label="COM_CONTACT_CONTACT_EMAIL_NAME_LABEL"
         filter="string"
         required="true"
      />


You have to change the size parameter.

It works perfectly when I do the modification directly in the "original" file, but I prefer to use the override principle because of the Joomla's update.

Ryo
User avatar
Senior Boarder

teitbite
Tue Jan 03, 2012 8:40 pm
Hi

I still think that css would be better in this case, but sure You can simply copy all changed files to template's /html/com_contact/ . Please remember to keep the folder structure exacly like in the component.
User avatar
Moderator


cron