Convert CheckBoxes Group to Radio Box

muleycharge 26 Nov, 2013
Hello Chrono helpers,thank you in advance for your help!
I've made a terrible stupid mistake. After creating a very large form composed mostly of checkbox group inputs I realized that I should have used the Radio Box control instead. I was confused by there not being a radio box group control and the singular sounding nature of the name "Radio Box". I noticed from the code that the CheckBoxes Group and Radio Box controls have almost identical code. Can I simply switch out the code highlighted below?

<div class="ccms_form_element cfdiv_checkboxgroup label_over" id="ablemeetneeds_container_div">
<label for="ableMeetNeeds">1. Was our website able to meet your needs?
<br /></label>
<input type="hidden" name="chkLst_ableMeetNeeds" value="" alt="ghost" />
<div style="float:left; clear:none;">
<input type="checkbox" name="chkLst_ableMeetNeeds[]" id="chklst_ablemeetneeds_0" title="ableMeetNeeds" value="choice 1"
class="validate['group[6]']" />
<label for="chklst_ablemeetneeds_0">Very Much So</label>
<input type="checkbox" name="chkLst_ableMeetNeeds[]" id="chklst_ablemeetneeds_1" title="ableMeetNeeds" value="choice 2"
class="validate['group[6]']" />
<label for="chklst_ablemeetneeds_1">Yes</label>
<input type="checkbox" name="chkLst_ableMeetNeeds[]" id="chklst_ablemeetneeds_2" title="ableMeetNeeds" value="choice 3"
class="validate['group[6]']" />
<label for="chklst_ablemeetneeds_2">Somewhat</label>
<input type="checkbox" name="chkLst_ableMeetNeeds[]" id="chklst_ablemeetneeds_3" title="ableMeetNeeds" value="choice 4"
class="validate['group[6]']" />
<label for="chklst_ablemeetneeds_3">No</label>
<input type="checkbox" name="chkLst_ableMeetNeeds[]" id="chklst_ablemeetneeds_4" title="ableMeetNeeds" value="choice 5"
class="validate['group[6]']" />
<label for="chklst_ablemeetneeds_4">Not At All</label></div>
<div class="clear"></div>
<div id="error-message-chkLst_ableMeetNeeds"></div>
</div>
GreyHead 27 Nov, 2013
Hi Muleychange,

There's no easy way to fix this. You could switch the form to Type=Custom and edit the HTML, that will work.

You could (and I probably would) edit the form in the Preview box by dragging in new elements and copying and pasting over the entries. I do this by having two copies open in different browser windows - makes it simple to copy over provided that you save the right one only.

If you are brave then you can try editing the wizardcode column in the #__chronoforms table for the form, you can try changing the type attribute there (and possible the key values as well). I've done this successfully to change container structures but not to change element types. !!! Back up first!!! !!!Test on a sample form!!!

Bob
This topic is locked and no more replies can be posted.