Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lagunawebdesign

    (@lagunawebdesign)

    The same condition is in function wpcf7cf_enqueue_scripts(WPCF7_ContactForm $cf7form) {
    When I remove it and add <?php echo wp_footer(); ?> in my ajax view – it’s working without modifying JS, but.. for multiple forms load it’s not working beacourse You use not unique ID for options $wpcf7cf_global_count (inline JS before body end tag).

    It would be better to set options in data- attribute in form 7 tag (<form .. data-cf7-cf="..{"form_id":"410","unit_tag":"wpcf7-f410-o1","conditions":[{"if_field..." ...>, and in JS do $(‘form’).each(… to get and set data…
    or after form tag in some span element, like:

    <form ...> ... </form><span data-cf7-cf="..{"form_id":"410","unit_tag":"wpcf7-f410-o1","conditions":[{"if_field..."></span>
    and in JS do $(‘form’).each(… $(this).next().data(‘cf7-cf’) …to get and set data…

    Thread Starter lagunawebdesign

    (@lagunawebdesign)

    I use ajax to load form (.../wp-admin/admin-ajax.php?action=...), after js ajax load:

    //wpcf7
    if ($.fn.wpcf7InitForm) {
    // form 7...
        $('div.wpcf7 > form').wpcf7InitForm();
    // other JS functions...
        datePicker_init();
         _autoComplete();
    //...
    }

    Why php shortcodes [/group] isn’t working after ajax call?

    In cf7cf.php line 289 is blocking condition:
    if (!is_admin()) { // TODO: kind of hacky. maybe find a better solution. Needed because otherwise the group tags will be replaced in the editor as well.
    You can replace it… if (!is_admin() || (defined(‘DOING_AJAX’) && DOING_AJAX)) {

    lagunawebdesign

    (@lagunawebdesign)

    +1

    Thread Starter lagunawebdesign

    (@lagunawebdesign)

    I wrote own php script to change wrong coding/charset

    ...
    			foreach($files as $file){
    
    				$path_parts = pathinfo($file);
    
    				$file_replace = $path_parts['basename'];						
    
    				if(mb_detect_encoding($file_replace, mb_detect_order(), true) == 'UTF-8'){
    
    					$file_replace = iconv("UTF-8", "Windows-1250", $file_replace);
    
    					$new_name = $path_parts['dirname'].DS.$file_replace;
    
    					//rename($file, $new_name);
    					copy($file, $new_name);
    					unlink($file);
    
    				};
    
    //debug($file); debug($new_name); die();				
    
    			}// endforeach file
    ...

    It would be nice to have an option to change FILE NAME (if UTF8 – is special chars) to slug/url valid file name by ONE CLICK in WordPress panel.

Viewing 4 replies - 1 through 4 (of 4 total)