Hi @jules-colle
your update setups the conditional fields before the form submission using ‘submit.wpcf7cf’ event on the custom cf7 admin page form as follows,
$('#wpcf7-admin-form-element').on('submit.wpcf7cf', function() {
update_settings_textarea();
return true;
});
My plugin, the CF7 Smart Grid, strives to more CF7 back into the WP core standard and as such does away with the custom cf7 admin page, using instead WP core posts.php (wpcf7_contact_form post type edit page) to handle the form editor. WP core uses form#post
as the id, instead of form#wpcf7-admin-form-element
used in the custom cf7 page.
A simple fix to the above issue is to change your event handling to also capture the #post
element event as,
$('#wpcf7-admin-form-element, #post').on('submit.wpcf7cf', function() {
update_settings_textarea();
return true;
});
would you consider making this small change? If you have a GitHub repo for your plugin, I can do a PR to make it easier.