I've got trouble with my contact form. It seems that com_contact is using its own renderfield.php that can be found in components/com_contact/layouts/joomla/form.

  1. Why its own renderfield.php and not its own renderlabel.php?
  2. How do I override renderfield.php?

1 Answer 1


I believe the function getRenderer in libraries/joomla/form/field.php is the one returning the rendering path, and the bug is there. I haven't tested this, but a quick search in the filesystem points me to that function.

In any case, you don't need, in my opinion, to go through the hassle and override the renderfield.php. You can just override the default_form.php ( com_contact/views/contact/tmpl/defaut_form.php ) and replace the following line:

<?php echo $field->renderField(); ?>

with a call to your function

<?php echo myRenderField($field); ?>

Where myRenderField will render $field in the way that you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.