콘텐츠로 건너뛰기 사이드바로 건너뛰기

Open

Topic Tags: Compatibility

Overview of the issue

When using GravityForms with the GravityForms Multilingual plugin, the form styling may break due to the gform_pre_render filter in the gravity-forms-multilingual.class.php file. The filter removes the data-form-index attribute from the form wrapper, causing GravityForms’ inline CSS to be disregarded.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php file.
  • Look for line 983.
  • Replace:
    	public function gform_pre_render( $form ) {
    		return $this->translate( $form );
    	}
    
  • With:
    // WPML Workaround for compsupp-7774
    	public function gform_pre_render( $form ) {
    		// Preserve the page_instance key if it exists
    		$page_instance = isset( $form['page_instance'] ) ? $form['page_instance'] : null;
    
    		// Translate the form
    		$form =  $this->translate( $form );
    
    		// Reassign the page_instance key after translation
    		if ( $page_instance !== null ) {
    			$form['page_instance'] = $page_instance;
    		}
    
    		return $form;
    	}
    

응답 4개 대상 “GravityForms Multilingual – Form Block Styling Issues”

    • Hello there,

      This should be implemented in Gravity Forms Multilingual v1.9, but I can’t provide an exact ETA at the moment. We’ll keep this page updated.

    • Hi Dimitri,

      Thanks for reaching out. The fix for this issue is scheduled for Gravity Forms Multilingual 1.9. Unfortunately, I don’t have an ETA at the moment, but we will keep this page updated.

답글 남기기

주제에 집중하고 다른 사람을 존중해 주세요. 이 게시물과 관련 없는 문제에 도움이 필요하면 지원 포럼을 사용하여 채팅을 시작하거나 티켓을 제출하세요.

다음 태그를 사용할 수 있습니다:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>