User tests: Successful: Unsuccessful:
Custom fields assigned to contact forms were always rendered at the end
of the form regardless of their configured display position.
The contact form template did not implement logic to render contact
custom fields based on their display parameter.
com_contact.mailFields are rendered respecting their configured display positions.
Fixes #46700
| Status | New | ⇒ | Pending |
| Category | ⇒ | Repository Front End com_contact |
| Labels |
Added:
PR-5.4-dev
|
||
@brianteeman
Thanks for the review.
I’ve restored the copyright header and removed the unnecessary inline
comment. The PR has also been cleaned up so it now only contains the
contact form change related to this issue.
@richard67
Thanks for pointing this out.
You’re right — those changes were not related to this PR. I’ve cleaned up
the branch and removed all unrelated commits so the PR now only addresses
the contact custom field display issue.
Suggested change accepted and conversation resolved
I am sorry but this fix is incorrect.
The fields should be rendered by Form class as rest of the fields.
The positioning need to be defined somewhere in the Contact Model or by Custom Fields plugin for the Contact form.
Thanks for the clarification.
Understood — rendering the custom fields directly in the template is not
the correct approach. I see now that the positioning logic should live in
the Contact model or be handled by the Custom Fields integration so that
the Form class is responsible for rendering, consistent with other
components.
I’ll take another look at how this should be implemented properly.
@sathwikre Another thing is that it seems to be a new feature, so a PR should be made for the 6.1-dev branch.
See also https://github.com/joomla/joomla-cms?tab=readme-ov-file#which-branch-should-my-pull-request-target
@richard67 to me its a bug as you can currently set the display position of a custom field for a contact but it is ignored. This pr would fix that bug
@richard67 to me its a bug as you can currently set the display position of a custom field for a contact but it is ignored. This pr would fix that bug
@brianteeman I see. Well then it should of course be done for 5.4-dev (if fixing the bug does not need to introduce a new feature),
@sathwikre - I am definitely not a good developer, but did I read this correctly that you are removing the 9 lines at the top of the screen which has licensing information for the file /components/com_contact/tmpl/contact/default_form.php, that is definitely not a good thing if that I understood it correctly.
I'm sure someone more knowledgeable than I can chime in on that.