Skip to content

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

Merged
Hlavtox merged 2 commits intoPrestaShop:developfrom
Codencode:contactform-hide-subject-when-single-contact
Mar 25, 2026
Merged

ContactForm: Hide subject dropdown when only one contact is available#201
Hlavtox merged 2 commits intoPrestaShop:developfrom
Codencode:contactform-hide-subject-when-single-contact

Conversation

@Codencode
Copy link
Copy Markdown
Contributor

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
Related PRs PrestaShop/contactform#88

Before

Classic-before

After

Classic-after

@Codencode Codencode requested review from a team, Hlavtox and Touxten February 12, 2026 13:26
Touxten
Touxten previously approved these changes Feb 12, 2026
tblivet
tblivet previously approved these changes Feb 17, 2026
Comment thread modules/contactform/views/templates/widget/contactform.tpl Outdated
@Codencode Codencode force-pushed the contactform-hide-subject-when-single-contact branch from 3fc03bb to 5ba3b06 Compare February 17, 2026 15:29
@ps-jarvis ps-jarvis moved this from Ready for review to To be tested in PR Dashboard Feb 17, 2026
@SiraDIOP SiraDIOP self-assigned this Feb 18, 2026
@Codencode Codencode requested a review from a team February 27, 2026 20:13
@Codencode
Copy link
Copy Markdown
Contributor Author

@PrestaShop/committers can someone explain to me why the Waiting for QA label was removed?
Maybe I'm missing something?

@Touxten Touxten added the Waiting for QA Status: Action required, Waiting for test feedback label Mar 20, 2026
@Touxten
Copy link
Copy Markdown
Contributor

Touxten commented Mar 20, 2026

Good Question

@Codencode
Copy link
Copy Markdown
Contributor Author

Probably ps-jarvis has some bug 😄

@SiraDIOP
Copy link
Copy Markdown

Hello @Codencode,

Thanks for your PR, i tested it and it's good for me ^^

Enregistrement.de.l.ecran.2026-03-25.a.15.41.34.mov

Thanks

@SiraDIOP SiraDIOP added QA ✔️ Status: Check done, Code approved and removed Waiting for QA Status: Action required, Waiting for test feedback labels Mar 25, 2026
@Hlavtox Hlavtox merged commit 003b07c into PrestaShop:develop Mar 25, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from To be tested to Merged in PR Dashboard Mar 25, 2026
@ps-jarvis
Copy link
Copy Markdown

PR merged, well done!

Message to @PrestaShop/committers: do not forget to milestone it before the merge.

@Hlavtox
Copy link
Copy Markdown
Contributor

Hlavtox commented Mar 25, 2026

Thanks everyone!!!

@Codencode Codencode deleted the contactform-hide-subject-when-single-contact branch March 25, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA ✔️ Status: Check done, Code approved

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants