Forums

[SOLVED]Checkbox not being saved when editing in show data

comraddan 09 Dec, 2009
I have a registration form on my site with some extra fields created with ChronoForms 3.1 RC5.5 on Joomla 1.5.15 and everything seems to work fine (input gets saved and email gets sent). When I try to edit the data using ChronoConnectivity I found that the second set of checkboxes are not being updated in the database. I turned email the results to yes in ChronoForms and the email shows the changes to the checkboxes, but if I click show data again the values are back to before the edit, but only on the second set of checkboxes. Everything else gets updated (including the first set of checkboxes. Also I have "ChronoForms handle my posted arrays" set to "yes" and the checkbox is marked as required.

Everything was created in ChronoForms and as far as I can tell works fine in ChronoConnectivity except this one issue. I can go in to PHPMyAdmin and change the value, but that's a real pain and I don't want my users messing with the database directly.

Here is what the code looks like for the second checkbox:
<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label" style="display: none;">Verify Experience and Education</label>
    <div class="float_left">
      <input value="Attended at least two *** ********** **** ****** Institute Affiliate Courses (**** or **** or ****)" title="" class="radio validate-one-required" id="check30" name="check3[]" type="checkbox" />
      <label for="check30" class="check_label">Attended at least two *** ********** **** ****** Institute Affiliate Courses (**** or **** or ****)</label>
      <br />
      
<input value="Negotiated" title="" class="radio validate-one-required" id="check31" name="check3[]" type="checkbox" />
      <label for="check31" class="check_label">Negotiated at least three (3) ********** **** ****** Transactions</label>
      <br />
      
<input value="Completed ***'* “Fundamentals of ********** **** ******” Course" title="" class="radio validate-one-required" id="check32" name="check3[]" type="checkbox" />
      <label for="check32" class="check_label">Completed ***'* “Fundamentals of ********** **** ******” Course</label>
      <br />
      
<input value="Invest a minimum of 60% of professional time dedicated to ********** **** ******." title="" class="radio validate-one-required" id="check33" name="check3[]" type="checkbox" />
      <label for="check33" class="check_label">Invest a minimum of 60% of professional time dedicated to ********** **** ******.</label>
      <br />
      
<input value="Registered “**********” as my primary specialty on the *** **** database system" title="" class="radio validate-one-required" id="check34" name="check3[]" type="checkbox" />
      <label for="check34" class="check_label">Registered “**********” as my primary specialty on the *** **** database system</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>
comraddan 09 Dec, 2009
Turning on debug and system debug here are the results of the update check3 is missing from the list:
UPDATE `jos_chronoforms_***_*******_******` 
  SET `text_designations`='Designations 123',`text_personal_website`='http://www.personalwebsite.com',`text_company`='Company Name',`text_company_websitecompany`='http://company-Website.com',`text_company_address`='Company Address',`text_city_town`='City/Town',`text_zip_code`='95825',`text_company_phone`='Company Phone',`text_direct_phone`='Direct Phone',`text_office_fax`='Office Fax',`text_cell`='Cell',`check0`='******, ******, **********, *****-******, ******** **********',`text_applicant_***_license`='123456789',`text_exp_date`='12/31/2009',`select_state`='California',`radio0`='Pending',`radio1`='Pending'
comraddan 09 Dec, 2009
I believe that I may have fixed the issue as it seems to be working fine for me now. I went into the form and copied a backup from earlier of the checkbox section that was giving me problems and changed the checkbox name to "check1" on the form and renamed check3 to check1 in PHPMyAdmin and all seems well again. Also I had to get rid of the diagonal quotes(“ ”) in the value for the checkbox (which was added by ChronoForms-not sure if that's a bug), but that was a quick and easy fix.

Here is the code that seems to be working in case it helps someone:
<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label" style="width: 1px;"></label>
    <div class="float_left">
      <input value="Attended at least two *** ********* **** ****** Institute Affiliate Courses (**** or **** or ****)" title="" class="radio validate-one-required" id="check10" name="check1[]" type="checkbox" />
      <label for="check10" class="check_label">Attended at least two *** ********* **** ****** Institute Affiliate Courses (**** or **** or ****)</label>
      <br />
      
<input value="Negotiated at least three (3) ********* **** ****** Transactions" title="" class="radio validate-one-required" id="check11" name="check1[]" type="checkbox" />
      <label for="check11" class="check_label">Negotiated at least three (3) ********* **** ****** Transactions</label>
      <br />
      
<input value="Completed **** Fundamentals of ********* **** ****** Course" title="" class="radio validate-one-required" id="check12" name="check1[]" type="checkbox" />
      <label for="check12" class="check_label">Completed ***'* “Fundamentals of ********* **** ******” Course</label>
      <br />
      
<input value="Invest a minimum of 60% of professional time dedicated to ********* **** ******." title="" class="radio validate-one-required" id="check13" name="check1[]" type="checkbox" />
      <label for="check13" class="check_label">Invest a minimum of 60% of professional time dedicated to ********* **** ******.</label>
      <br />
      
<input value="Registered ********* as my primary specialty on the *** **** database system" title="" class="radio validate-one-required" id="check14" name="check1[]" type="checkbox" />
      <label for="check14" class="check_label">Registered “*********” as my primary specialty on the *** **** database system</label>
      <br />
This topic is locked and no more replies can be posted.