Contact Widget – How can I customize the form fields


I am trying to customize the Contact Widget. I would like to add a field for their phone number. How do I add a field?

Also, is it possible to add field validation?



  • Ash
    • WordPress Hacker

    Hello @dave

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    You need to customize the plugin code. Please go to /wp-content/plugins/contact-form/contact-form.php line no 224 and you will get the html for the form. You need to add extra field in this section.

    And then you need to edit the file /wp-content/plugins/contact-form/scripts/js/global.js to populate with new field.

    Hope it helps! Please feel free to ask more question if you have.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.