plugins – Programatically add text field to Contact Form 7
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
5 times
I would like to add a text field to all my forms programatically. There is a hook for adding hidden fields (wpcf7_form_hidden_fields
) but I can not find one for regular fields. I tried modifying the form via wpcf7_form_elements
which works, I get my new field. However it is not really part of the Contact Form 7 cosmos, I can not use wpcf7 validation on it.
Is there another way?
Thanks
Jan Osch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
default
Leave an answer