This depends a lot on the context.
Normally, I would say that the form should be in a plugin.
The rule of thumbs is that if it’s a functionality that could still be needed when the theme is deactivated, then it should go into a plugin.
Now for your specific case, if using the customizer, would set options that could potentially break your form if the theme should be changed, then you should keep it in your theme’s functions.php.
But, I would still argue that it should go into a plugin and you should make sure that, in the eventuality that the theme is changed, you set default values to the form to replace the customizer options.
Because chances are that even if the theme is changed, you’d still want the contact form to be active.
Related Posts:
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Is there any sort of theme dependency management?
- Can I make plugins required?
- Add Plugins to WordPress Theme
- wp_enqueue_scripts not working in custom theme
- What is the correct way for a theme to support plugin UIs?
- How to call “page specific menu items” in template [closed]
- Create WooCommerce Product Category Programmatically
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- WordPress tips for speed and performance [closed]
- How to access options of Redux framework in front end
- Integrating plugins in themes
- How do I make my wordpress page more friendly for mobile viewers?
- WordPress Enqueue Script Chaos (jQuery & Foundation.js)
- login to wordpress with Get variables instead of Post
- Should I add sharing buttons using a plugin or directly in my theme files?
- Check javascript file Proper way in functions.php
- Should I use RIPS tool to test my themes and plugins?
- Translate third party plugin and save translation files in custom theme
- How to Build a Movie Library in WordPress 3.x
- How do I future proof my older WordPress theme?
- register_theme_directory somehow “fails” when folder is outside of WP-Folder
- Display future posts?
- Having separate plugins and themes folder for multi-site setup
- How can I get full attachment url from wp_get_attachment_metadata?
- unzip a folder on specific location and delete the zip file
- gallery option is not available in media upload box in costum theme option page
- How to limit WordPress pages during updates?
- Why are some of my thumbnails not being generated?
- Why is the Settings API is not saving my array of options
- Built in audio player?
- Override the filter from plugin in child theme
- Network: retrieve a list of latest posts
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- How to use get_theme_mod in gutenberg editor wordpress?
- wp_get_post_terms is difference obj model than the one in rest api response
- how to add a button next to the wordpress view button?
- Best place for short bio,image and button [closed]
- What are the specifics of WordPress development I need to know? [closed]
- WordPress shows error related to allow_url_fopen
- How to create a code editor for my plugin .?
- How to show only next post pagination link using wp_link_pages()
- wp_footer hook only working on homepage not in other pages
- Plugin can not display in my custom theme
- How to use get_template part in the plugin?
- WordPress premium theme development [duplicate]
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- How can I show a different theme for admin users? WP 3.8+
- How to show the number of website visitors in my theme
- How to write “alt” tag in image for wordpress code?
- How to multiply a post to test internal search results?
- Use different single.php file based on condition
- What form should the $query media query array have for an Elementor page builder function? [closed]
- is_rtl returns false while it should return true
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- Widget for specific category
- How to customize this theme? [closed]
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Remember the Meta Value With Radio Buttons
- WordPress plugin with its own “site”/theme
- Theme Functions run a function upon activation or preview
- Polldaddy doesn’t show up on own theme
- Is there a way to insert multiple images into a post at the same time without using a gallery?
- Is there a way to keep youtube videos from displaying on home page, and display only on single posts?
- Janrain/Simple Modal under Redirected Domain
- Warning: Attempt to read property “ID” on null in C:\xampp\htdocs\Nnamdi1\wp-content\plugins\elementor\core\base\document.php on line 250 [closed]
- Seperate plugin and theme files
- Elementor Sidebar not loading when PRO elements plugin is active
- How would I get the new plugin version on this function?
- how to display recent post by category on home page
- Unpublished Pages Failing To Appear On Custom Path
- How to get checkbox by default true in metabox?
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- Disqus comment system not show
- When the user entered an unauthorized url redirect to login page
- Remove action added in plugin class from theme
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Show content from plugin on index
- how to add custom css at top above all css file for specific url
- How to add wordpress plugins in along with my standalone theme
- How can I add different menus (different style menu) on each page?
- Site is setup statically – how to make it content managable?
- How can I make a website with dynamic features with wordpress?
- How to create post comparison in wordpress
- Open graph issue on my theme
- Javascript as Jquery Function Call?
- Detect if you’re in the “Frontend Editor” mode in Visual Composer WordPress [closed]
- Can anyone tell some online tuts for plugin development for beginner? [closed]
- How to escape html code?
- Is website for online game guides doable in WordPress? [closed]
- add_meta_box showing blank screen in my page
- Best approach to change mobile background image and adding its class
- Frontend Enqueued Files in the Backend
- How to create new title and its description inside a section in WP Customizer?
- I want to move the one click accesbility button on bottom of my website screen,
- Automatically install bundled plugins during theme activation?