We have developed the feature for Exposing Fields based on Radio Button in Salesforce. Try the below code,
<apex:page >
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script>
<script type=”text/javascript”>
function yesnoCheck() {
if (document.getElementById(‘yesCheck’).checked) {
document.getElementById(‘ifYes’).style.display = ‘block’;
}
else document.getElementById(‘ifYes’).style.display = ‘none’;
}
</script>
Yes <input type=”radio” onclick=”javascript:yesnoCheck();” name=”yesno” id=”yesCheck”/>
No <input type=”radio” onclick=”javascript:yesnoCheck();” name=”yesno” id=”noCheck”/>
<div id=”ifYes” style=”display:none”>
If yes, explain: <input type=’text’ id=’yes’ name=’yes’/>
What can we do to accommodate you?
<input type=’text’ id=’acc’ name=’acc’/>
</div>
other 3<input type=’text’ id=’other3′ name=’other3’/>
other 4<input type=’text’ id=’other4′ name=’other4’/>
</apex:page>
Result:-
We are the ISV Partners and Please reach us for custom development => www.merfantz.com
——————Hope this will help you!——————