Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sophos

    (@sophos)

    Another issue I found: titles of some fields are displayed even if field is hidden. Seems like header goes before div, that has classes “wpcf-wrap wpcf-repetitive-wrapper”. (/wp-content/plugins/types/embedded/classes/repeater.php:line 316).
    I moved title just after div. It could make more bugs, but for now working fine 🙂
    Finished code is:

    // Set title
    // $form[$unique_id . '_main_title'] = array(
    	// '#type' => 'markup',
    	// '#markup' => '<strong>' . $this->title . '</strong><br/>',
    // );
    
    /*
     *
     *
     * Start wrapper
     */
    $form[$unique_id . '_repetitive_wrapper_open'] = array(
    	'#type' => 'markup',
    	'#markup' => ''
    	. '<div id="wpcf_'
    	. $form_id
    	. '_repetitive_wrapper_' . $unique_id
    		. '" class="wpcf-wrap wpcf-repetitive-wrapper" style="' . $css_cd . '"><strong>' . $this->title . '</strong><br/>',
    	);

    The solution for 1.2 is to add:

    if( !function_exists( 'wpcf_admin_add_js_settings' ) ) {
        require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
    }

    into /wp-content/plugins/types/embedded/includes/conditional-display.php

    just before string

    wpcf_admin_add_js_settings( 'wpcfConditionalVerifyGroup',
            wp_create_nonce( 'cd_group_verify' ) );

    (it is line 32 at the moment)

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