0
중력 양식 용 add_filter를 적용 할 때 도움이 필요합니다. 몇 가지 조사를 해본 결과이 링크 http://www.gravityhelp.com/documentation/page/Gform_pre_render은 맞춤 필터를 적용하는 방법에 대한 대략적인 예입니다. 불행히도 운이 없어서 일하지 못했습니다. 오류가 없습니다. 사용자가 하나를 선택할 때 라디오 버튼의 상단이나 하단에 에코 텍스트를 표시하려고합니다.중력 양식 add_filter
<ul class="gfield_radio" id="input_7_16">
<li class="gchoice_16_0">
<input name="input_16" type="radio" value="Plan 180" id="choice_16_0" tabindex="1">
<label for="choice_16_0" id="label_16_0">Op1</label>
</li>
<li class="gchoice_16_1">
<input name="input_16" type="radio" value="Plan 420" id="choice_16_1" tabindex="2">
<label for="choice_16_1" id="label_16_1">Op2</label>
</li>
<li class="gchoice_16_2">
<input name="input_16" type="radio" value="Plan 560" id="choice_16_2" tabindex="3">
<label for="choice_16_2" id="label_16_2">Op3</label><
/li>
</ul>
중력 폼 필터
add_filter('gform_pre_render_6', 'populate_text');
function populate_text($form){
if ($field["id"] == choice_16_0) {
echo '<br/>Your start date is Saturday ' , getStartSat();
}
else if ($field["id"] == choice_16_1) {
echo '<br/>Your start date is Monday ' , getStartMon();
}
else if ($field["id"] == choice_16_2) {
echo '<br/>Your start date is Saturday ' , getStartSat(), 'or <br/> Monday ' , getStartMon();
}
return $form;
}