Feature Unit/System Tests Language Change PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar obuisard
obuisard
16 May 2026

This contact form module has been created for a session given at Joomla Day USA.
The aim of that session was to show how AI could help create such a module.
It has been modified to comply with Joomla's AI policy and ensure it follows the Joomla code standards.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

This is brand new module for the Contacts component. It offers the same functionality as the contact form for a contact view.
However, the form is embedded in a module and can therefore be placed anywhere on a page.
It uses Ajax to prevent a page refresh upon sending the email.

image

Testing Instructions

Make sure there is at least one contact in the Contacts component.
You need a captcha solution selected in the global configuration of the site (Site tab) to test captcha with the form.

Go to Content -> Site Modules -> Select 'New' -> Select 'Contact Form'.
Select 'Toggle Inline Help'. There is no user documentation at the time of this writing.

You can create several modules on a same page.

  • Select a contact
  • Create a module where you sow contact information, create one module where you don't.
  • Select default captcha in a module, 'none selected' in another,
  • Add a success message to a module, have one module with an empty message.
  • Enter a full URL for redirection in one of the test modules (for instance 'https://your_test_site' to redirect to 'home').

When testing the default captcha option: this tells the module to use the Contacts component settings. So the form should show a recaptcha or not depending on the choices made at the Contacts component level.

Make sure that fields are properly validated and feedback is returned (for email, for instance, you should not be able to send the form if it is not a proper formatted email address).

Try entering loooooooooong strings in the fields. The page should not crash.

Try adding custom fields for the Contacts component.
Go to Components -> Contacts -> Fields -> Select 'Mail' in the select box below 'New'.
Create the Text field 'Company'. Make sure the permission 'Edit Custom Field Value' is set to allowed for 'Public'.
This field should show in the contact form module and the field should be editable.

Emails are sent through the contacts Mail Template 'Contacts: Contact Form Mail'.

If a contact has no email address but is linked to a user, the email should be sent to the user's email address.
If a contact has no email address and is not linked to a user, the form should fail gracefully.

Actual result BEFORE applying this Pull Request

No contact form functionality in a module.

Expected result AFTER applying this Pull Request

Contact form functionality in a module.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org: TODO

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Cypress tests:

  • renders the form when configured with a published contact
  • does not render the form when contact is unpublished
  • rejects tampered contact_id submissions
  • shows success in the result container without replacing the form
avatar obuisard obuisard - open - 16 May 2026
avatar obuisard obuisard - change - 16 May 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 May 2026
Category Language & Strings JavaScript Modules Front End Unit Tests
avatar obuisard obuisard - change - 16 May 2026
Labels Added: Unit/System Tests Language Change PR-6.2-dev
avatar obuisard obuisard - change - 16 May 2026
Title
[AI] Contact Form Module - Please do not test at this time
[AI] Contact Form Module - THIS IS A DRAFT - Please do not test at this time
avatar obuisard obuisard - edited - 16 May 2026
avatar obuisard obuisard - change - 16 May 2026
The description was changed
avatar obuisard obuisard - edited - 16 May 2026
avatar brianteeman
brianteeman - comment - 16 May 2026

thanks for this. its a module that many people have wanted for a very long time and there is NO third party contact module that is directly connected to the contact component and truly joomla native

there are quite a few changes needed for it to be included in core

  • sql (new installs)
  • sql (updates)
  • list of core extensions

I will do those as a pr against your branch sometime this weekend

avatar brianteeman
brianteeman - comment - 16 May 2026

pr done on your branch

avatar obuisard obuisard - change - 16 May 2026
Labels Added: Feature
avatar joomla-cms-bot joomla-cms-bot - change - 16 May 2026
Category Language & Strings JavaScript Modules Front End Unit Tests SQL Administration com_admin Postgresql JavaScript Repository Installation Language & Strings Libraries Modules Front End Unit Tests
avatar obuisard
obuisard - comment - 16 May 2026

pr done on your branch

Thank you Brian @brianteeman, I have added the missing pieces, thank you very much for your help.

Add a Comment

Login with GitHub to post a comment