Forum Replies Created
-
Thank you very much. Now it work perfectly with the original code in file /wp-content/plugins/dhe-form/includes/functions.php
Now, I would not have a problem while updating your great plugin
Best Regards
in reply to: Conditional field display should also apply to emailMy problem is:
It works as I want (*) ONLY IF I modify /wp-content/plugins/dhe-form/includes/functions.php(*) no output in confirmation email for empty fields or fields begining with “_”
My Code (full code in attachment)
add_filter('dhe_email_ignore_field_name', function($form_id, $posted_data, $form_fields){ $ignore_field = array(); foreach ($posted_data as $keypost => $valuepost) { ..... } return $ignore_field; },10,3);
Original version of /wp-content/plugins/dhe-form/includes/functions.php
Code:function dhe_email_ignore_field_name($form_id, $posted_data, $form_fields){ return apply_filters('dhe_email_ignore_field_name', array(), $form_id, $posted_data, $form_fields); }
Whith this code and my add_filter, it does not work (for me?)
But it works perfectly if I modify /wp-content/plugins/dhe-form/includes/functions.php
with the codefunction dhe_email_ignore_field_name($form_id, $posted_data, $form_fields){ return apply_filters('dhe_email_ignore_field_name', $form_id, $posted_data, $form_fields); }
So there is no problem for me except that I changed your code and that I will have problems during the next update of your plug-in unless you apply the modification that I made if it is correct or if we find why it does not work with "array ()" in your function dhe_email_ignore_field_name Best Regards.
Attachments:
You must be logged in to view attached files.in reply to: Conditional field display should also apply to emailThis reply has been marked as private.in reply to: Conditional field display should also apply to emailGreat ! I am very happy with the proposed solution and your sample code.
Thank you very much!
in reply to: Conditional field display should also apply to email