1

I need to change the items of a radio group based on a drop-down selection in RSForm pro.

Right now I'm using the Conditional Fields feature to show different radio group field and that caused too many confusion and was wondering if I could do that trough JavaScript.

Found the Dynamic Drop-down change here

https://www.rsjoomla.com/support/documentation/rsform-pro/frequently-asked-questions/dynamic-drop-down-change-form-example-.html

how can I change that to show the items for the second drop down in radio group instead.

Drop-down name: appliances

items: Cooker Oven ...

Radio group name: type

<div class="form-group rsform-block rsform-block-appliance{appliance:errorClass}">
<label class="col-sm-3 control-label formControlLabel" data-toggle="tooltip" 
title="" for="appliance">{appliance:caption}
<span class="star">&nbsp;*</span></label>
<div class="col-sm-9 formControls">
  {appliance:body}
  <span class="formValidation">{appliance:validation}</span>
  <span class="help-block">{appliance:description}</span> 
</div>
</div>
<div class="form-group rsform-block rsform-block-type{type:errorClass}">
 <label class="col-sm-3 control-label formControlLabel" 
data-toggle="tooltip" title="" for="type">{type:caption}
<span class="star">&nbsp;*</span></label>
<div class="col-sm-9 formControls">
  {type:body}
  <span class="formValidation">{type:validation}</span>
  <span class="help-block">{type:description}</span>
</div>
</div>

for cooker, the radio group items are: Gas, Electric, Dual Fuel, Range for oven the radio group items are: Single Ovens, Double Ovens

thanks in advance.

  • Not really helpful (sorry), but you really shouldn't. I am fairly sure the actual reason the users are confused is not the use of conditional fields, but the use of radio group in a way it is not generally used. The key point of radio groups is that all the options are visible at all times. This is good for static options and extremely confusing if the options change or appear to change after you first saw the radio group. // Least work solution: add -no selection- type selection that shows no radio group, with radio group conditional fields only shown after selection. Or have two forms... – Ville Niemi Mar 8 '17 at 19:55

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.