Sitesao Support
  • Home
  • Themes
  • Plugins
  • Support

Support Forums

Home/Forums/
  • Profile
  • Topics Started
  • Replies Created
  • Favorites

Forum Replies Created

  • 6 years, 10 months ago phdenis63
    Participant
    Post count: 4

    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 email
    6 years, 10 months ago phdenis63
    Participant
    Post count: 4

    My 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 code

    function 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 email
    6 years, 10 months ago phdenis63
    Participant
    Post count: 4
    This reply has been marked as private.

    in reply to: Conditional field display should also apply to email
    6 years, 10 months ago phdenis63
    Participant
    Post count: 4

    Great ! 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
Viewing 4 posts - 1 through 4 (of 4 total)
© Copyright Sitesao.com - Support Policy