ContactForm: Hide subject dropdown when only one contact is available#88
Conversation
|
Hello @Codencode! This is your first pull request on contactform repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
|
@kpodemski Thanks |
tblivet
left a comment
There was a problem hiding this comment.
Sorry, I didn’t see the question about the CI break!
Any thoughts on this? @kpodemski
Touxten
left a comment
There was a problem hiding this comment.
Ok for CI it's for all native module
SiraDIOP
left a comment
There was a problem hiding this comment.
Hello @Codencode,
Thanks for your PR , i tested it but i don't have the same result
Enregistrement.de.l.ecran.2026-02-25.a.17.26.54.mov
Did i miss something?
Thank you
|
Hello @SiraDIOP, |

Instead of rendering a
<select>with a single option, the module now automatically sets theid_contactvalue using a hidden input.This improves the user experience by removing an unnecessary selection while preserving the expected form behavior.
- Delete the contacts, leaving only one
- In the front office, go to the Contact page
- The
Subject Headinglabel and its related select dropdown should not be displayedNOTE:
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
hummingbirdtheme, do the same.This is essential to see the modification.
PrestaShop/classic-theme#201
Before
After
Note
If this PR is approved, I will update the
modules/contactform/views/templates/widget/contactform.tplfile in both the classic and hummingbird themes accordingly.