Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to modify the fields on the contact form?
We have implemented the Contact Entityforms module which makes it possible to modify the site wide and user contact forms. However, this doesnt change the Views Contact Form.
Comments
Comment #1
PolHi,
Like said on the fontpage of the project, my module creates a new form FROM the original contact form.
The new form ID is: views_contact_form_contact_form.
Comment #2
PolComment #3
bherring CreditAttribution: bherring commentedThanks for the reply.
So the only why is to use a hook_form_alter?
Comment #4
PolYes,
Using
hook_form_alter()
you'll be able to change anything you want.Or, if you propose something better for my module, I'm ready to do it, at that time, I didn't find anything better than this solution.
Comment #5
bherring CreditAttribution: bherring commentedYour module provides a solution for me I cant find elsewhere. I have a view which lists email addresses which can be filtered by the user. Beside the view, in a block, the user completes the form. It then sends it to each email in the view. All I need now is to be able to change the fields.
Could it be possible for your module to integrate with Contact Entityforms module?
Comment #6
PolThis is a good question, and that's something I cannot decide.
If it were me only, I would think that it's your module who should use the
hook_form_alter()
to integrate into mine.If it's not a good idea, how do you see the integration of yours into mine ?
Comment #7
PolComment #8
bherring CreditAttribution: bherring commentedSorry for the misunderstanding Contact Entityform is an existing module which isnt mine. Im just trying to get the functionality of your module and Contact Entityform.
Comment #9
PolOh sorry :)
Let's say that I would like to integer Contact EntityForm into my module, how do you see it ?
Comment #10
bherring CreditAttribution: bherring commentedWith Contact Entityform enabled there is config to choose which entity form is used for contact forms (?q=admin/config/people/contact-entityform)
Could your module have admin to choose which entity form is used for the form?
Comment #11
Polbherring,
I will release a new version soon, how can you help for fixing this ?
thanks!
Comment #12
Pol