thanks for giving the plugin a test :).
this is indeed a bug, however, the author of the CF plugin has provisioned for hidden fields to be removed from the posted data at submission time. However, I found a bug in the CF code which prevents these fields from being removed. I have raised an issue in the CF support forum. Let’s give its author a few days to respond. If that’s fixed this issue will automatically go away. Else I will have to implement some specific code to deal with it.
In the mean time you can fix the bug in your copy of the CF plugin to make it go away.
Thread Starter
Colir
(@colir)
Not sure to well understand the problem in the CF7 plugin, but i’ve fixed the problem by changing priority of the filter ‘wpcf7_validate’ in the CF7 conditionnal plugin.
I’m not a good wp dev, so i did’nt know if there are a better trick to do that
so i changed
add_filter( 'wpcf7_validate', array($this, 'skip_validation_for_hidden_fields'), 2, 2 );
to
add_filter( 'wpcf7_validate', array($this, 'skip_validation_for_hidden_fields'), 31, 2 );
because in CF7 grid you use a prior level of ’30’ on that filter.
Thank a lot for your support, and hope there will be a better fix that will not break on plugins update.
thank you
Thread Starter
Colir
(@colir)
Hi Aurovrata.
I see that you have done an update of your plugin with this change:
“skip over any fields removed from cf7 posted data array on submission.”
Is this modification must remove the problem with conditionnal fields plugin?
I’ve update your plugin and revert back my modification on wpcf7_validate filter , but without success…
thank you
Bonojour @colir
indeed, but I am not sure why my morning reply did not post. I had replied to your previous post this morning, but for some reason I did not upload it.
because in CF7 grid you use a prior level of ’30’ on that filter.
so your solution would work in this specific case. However, the approach of the CF plugin author to filter out hidden fields is more robust and versatile.
So for now I am release v1.9 which includes a mechanism to skip over hidden fields as per the original design of CF plugin. However, as I pointed out earlier, I noticed as error in the CF plugin code which prevents de hidden fields from being properly removed. Once the author updates his plugin, the SG plugin will be ready.
I keep this thread open till we hear from the CF author. Else if he doesn’t patch his code I will include some specific solution in my plugin.
because in CF7 grid you use a prior level of ’30’ on that filter.
so for now revert back to your solution.
Jules Colle answered my change request, so we should have a fix very soon 🙂
Jules doesn’t seem to be responding anymore, so I am assuming he must be too busy to update his pluign. I have therefore added some specific code to take care of this issue in v2.1. Hopefully with the next update of the Confidential Fields plugin I will be able to remove that code.
So for now, you should be able to update your plugins without having to hack into the code.
can you please confirm that v2.1 works out-of-the-box for you?
I am assuming this is working satisfactorily now, so I am closing this issue.