This is not possible with Contact Form 7 plugin. Instead you can make use of the dynamic_dropdown tag offered by the CF7 plugin extension, CF7 Smart Grid-layout. This allows you to create a dynamic dropdown, which has an option to filter the drodown’s options, and therefore create a custom set of options,
add_filter('cf7sg_dynamic_dropdown_custom_options', 'custom_options');
function custom_options($options){
return "
<optgroup>
<option>...</option>
</optgroup>
";
}
the plugin enables filter helpers once you insert a tag field in your form. these helpers have more information to help you with their functionality.
Related Posts:
- Contact form 7 select box different value-text than content-text in option [closed]
- Why “Contact Form 7” doesn’t update PHPmailer library?
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- To Disable WordPress Rest API or Not To Disable?
- Contact Form 7 plugin refreshing page on submit [closed]
- How to disable autocomplete for inputs in contact form 7? [closed]
- Server side validation for Contact Form 7 [closed]
- get values from contact form 7 wp plugin [closed]
- Add custom variable in Contact Form 7 mail body
- Can’t send mails using contact plugin [closed]
- Download any file after submitting a form [closed]
- Getting value from dymanic text variable into Contact Form 7
- How to escape the tailwindcss responsive syntax when using with contact form 7? [closed]
- Nextcloud integration with wordpress
- Send Contact form 7 data to remote server using .NET api [closed]
- how to create progress bar in wordpress contact form 7 or other plugin for set progress bar in cf7 [closed]
- Contact Form 7 – Form name blank [closed]
- WordPress contact form 7 to show the form dropdown menus as like [closed]
- Contact Form 7 – Show image on successful send? [closed]
- Send email to multiple addresses on Contact Form 7, but exclude personal details on all but one
- Hardcode a form in Contact Form 7 [closed]
- Contact Form 7 “non-selectable” options in a drop down [closed]
- Contact Form 7: Load scripts and styles only when there is shortcode? [closed]
- In wordpress how to sent different email separetly when i click on different email ids [closed]
- value not set in contact form 7 plugin of wordpress [closed]
- acceptance_as_validation: on is not working Contact form 7 [closed]
- Contact Form 7 is not redirecting the “Thank-You” page with the removal of CSS and JS of plugins
- Push Contact form 7 variable to front end after submission
- How can I implement radio buttons with icons in Contact form 7?
- Hide button after form submit and save state to localstorage
- Contact Form 7 – Make a selection unavailable after a number of bookings
- WordPress Contact 7 Form – Remove WordPress from the From Sections
- Installation failed, trying to install ANY plugin
- CF7 Custom Recipient – Changing the text
- Multiple CF7 Forms causing multiple recaptcha requests
- Could someone maybe point me in the direction of a decent tutorial on how to create a wordpress plugin that is compatible with another plugin please?
- Capture Recaptcha fail event on Contact Form 7
- get/show Last ID
- Form is not getting submitted [closed]
- User content database [closed]
- Contact Form 7: custom validation [closed]
- Retrieving old forms in Contact Form 7 [closed]
- Integrate Mailchimp to a Contact Form 7 contact form [closed]
- How put a file when the email is sent to user contact form 7
- Contact Form 7 Default value from url [closed]
- Integrate Razorpay quick payments plugin with contact form7 plugin
- How to do Conact form 7 name field validation? [closed]
- Contact form 7 – How to send mail to two different E-mail Address [closed]
- prevent contact form 7 from submission on certain condition
- plugin doesn’t retrieve data from database
- What happens when two plugins have the same 3rd party class included into them?
- add_rewrite_rule, plugin activation and plugin deactivation
- Update Multiple Post Meta for the Same Post In One call?
- Allowing Custom Capability to Manage Plugin Options
- wp_insert_user – how to send verification email before logging in
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- How Can I Pass the Shortcode’s $atts Variable to the Plugin’s Javascript Function
- Reset WordPress website
- Building a store locator with google maps
- Runng Cron Job for Plugin With No CronTab Access
- Creating a social media score plugin
- New to wordpress, Question about editing PHP
- How to modify WCMP Rest API response?
- posts comments goes to trash
- Privileges problem with add_submenu_page [closed]
- Modify wp_installed_email / wp_new_blog_notification
- Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin
- iframe not showing in post (with “allow php in posts” plugin activated)
- how can I do something on new user registration?
- How to remove bulk actions from custom post type
- License validate function
- Plugin for an interactive image? [closed]
- Redirect Plugins.php to New Plugin Page
- How to add an extra, independent set of custom fields?
- Making the ‘add to cart’ button redirect to PayPal
- WordPress search shows protected content
- Change Dashboard URL from wp-admin to wp-admin/index.php
- How to customize maintenance mode notification in wordpress?
- What is com_jce
- Cant create table on plugin activation
- Why is my shortcode not working?
- Critical Error after Updraft Restoration
- How to add specific posts to specific pages in WordPress?
- added code to permalink (URL)
- Why is my custom taxonomy image not displaying?
- How to order blog posts by no. of likes?
- Set Content-Type header in do_parse_request filter
- What action or filter can I use to change all the html returned from server for a page?
- Convert HTML5/CSS3 site to WordPress Theme (need a lot of plugins) or just use the API?
- Extending the “Add Media”-Dialog … how do I finally insert something to the Post?
- How can I retrieve data within my widget
- What tool are available in the wordpress API for debugging a plugin?
- In my plugin when i call select page is blank
- Twitter List Tweets and Delicious Links as Posts
- Replace all media (images)
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- How I can hide my wp folders from Inspect Element (Developer Tools)
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- Disable auto-embed feature when pasting links in Gutenberg editor?
- On WordPress.org Plugin repository, Last Updated Date doesn’t match with Plugin Version Update Date