2017-04-20 8 views
0

중력 양식 WordPress 플러그인을 사용하여 다중 페이지 양식을 만들었습니다. 나는 확인란을 만들었으며 확인란을 선택하고 확인란을 선택하지 않으면 다른 레이블을 표시해야합니다. 단일 페이지 양식 인 에 대해 JQuery를 사용했지만 다중 페이지 양식에서는 작동하지 않습니다. 전체 웹 페이지를 다시로드하지 않고중력 양식에서 동적으로 확인란 레이블을 변경하는 방법

+0

. 그리고 필요할 때 바로 js 함수를 호출하십시오 – Jenish

+0

finad a solution https://www.gravityhelp.com/documentation/article/gform_post_render/ 도움 주셔서 감사합니다 – ashanrupasinghe

답변

0

멀티 페이지 중력 폼로드 다른 페이지 그래서 경우 양식의 숨겨진 부분을 식별 할 수 jQuery를 작성하는 것이 할 수있는 적절한 방법이 있나요. 그래서 우리는 양식 페이지로드 후 우리의 jQuery 기능을 발사

jQuery(document).bind('gform_post_render', function() {}); 

를 사용할 수 있습니다.

참조 :

0

https://www.gravityhelp.com/documentation/article/gform_post_render/는 시도 당신은 당신이 JS를 쓸 수 있다는 점에서 도우미의 js 파일을 생성해야이

jQuery(document).bind('gform_post_render', function(){ 

     // destroy default Gravity Form datepicker 
     jQuery("#your_id").datepicker('destroy'); 

     // create new custom datepicker 
     jQuery("#your_id").datepicker({ defaultDate: '+7d', minDate: '+7d', gotoCurrent: true, prevText: *, showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true }); 

    }); 

</script>