Skip to content

ContactForm: Hide subject dropdown when only one contact is available#88

Open
Codencode wants to merge 2 commits intoPrestaShop:devfrom
Codencode:contactform-hide-subject-when-single-contact
Open

ContactForm: Hide subject dropdown when only one contact is available#88
Codencode wants to merge 2 commits intoPrestaShop:devfrom
Codencode:contactform-hide-subject-when-single-contact

Conversation

@Codencode
Copy link

@Codencode Codencode commented Feb 12, 2026

Questions Answers
Description? When only one contact is available in the Contact Form module, the subject dropdown is no longer displayed.
Instead of rendering a <select> with a single option, the module now automatically sets the id_contact value using a hidden input.
This improves the user experience by removing an unnecessary selection while preserving the expected form behavior.
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket?
How to test? - In the admin panel, go to Shop Parameters > Contact
- Delete the contacts, leaving only one
- In the front office, go to the Contact page
- The Subject Heading label and its related select dropdown should not be displayed

NOTE:
If you are using the classic theme, delete (or rename) the file
themes/classic/modules/contactform/views/templates/widget/contactform.tpl.
If you are using the hummingbird theme, do the same.
This is essential to see the modification.
Related PRs PrestaShop/hummingbird#932
PrestaShop/classic-theme#201

Before

Before

After

After

Note

If this PR is approved, I will update the modules/contactform/views/templates/widget/contactform.tpl file in both the classic and hummingbird themes accordingly.

@ps-jarvis
Copy link

Hello @Codencode!

This is your first pull request on contactform repository of the PrestaShop project.

Thank you, and welcome to this Open Source community!

@github-project-automation github-project-automation bot moved this to Ready for review in PR Dashboard Feb 12, 2026
@Codencode Codencode requested review from a team, Hlavtox, Touxten and kpodemski February 12, 2026 08:49
Hlavtox
Hlavtox previously approved these changes Feb 12, 2026
Touxten
Touxten previously approved these changes Feb 12, 2026
Copy link
Contributor

@Touxten Touxten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic

@Codencode Codencode dismissed stale reviews from Touxten and Hlavtox via 2dde702 February 12, 2026 15:29
@Codencode Codencode requested review from Hlavtox and Touxten February 12, 2026 15:30
@Codencode
Copy link
Author

@kpodemski
there's a compatibility issue with PHP here, similar to this other PR: PrestaShop/ps_socialfollow#51
However, my PR didn't touch the contactform.php file.
Fixing this issue is relatively simple, so do you think I should fix it? Or should we leave it as is?

Thanks

Copy link

@tblivet tblivet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn’t see the question about the CI break!
Any thoughts on this? @kpodemski

Copy link
Contributor

@Touxten Touxten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for CI it's for all native module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

6 participants

Comments