• Resolved cognoquest

    (@cognoquest)


    I wish to confirm a behavior with all fields elements that are configured with checkbox functionality.

    If I disable a field in the template:

    $this->record->yp_prog->fields->cansail_12_program->readonly = 1; // Form Element: Multiselect/Other
    $this->record->yp_prog->fields->cansail_34_program->readonly = 1; // Form Element: Multiselect Check
    $this->record->yp_prog->fields->cansail_56_program->readonly = 1; // Form Element: Multiselect Check

    The behavior that I get during an update is if the checkbox was checked on one of the fields and the access is disabled the field will get promoted unchecked in the DB.

    I did find a quick remedy to the problem. Upon button submission to enable the access with a jquery call:

    $('.pdb-submit').click(function() {
      $(".multicheckbox, .checkbox-other-control-group").each(function() {
        $(this).find(":input:checkbox").attr("disabled", false);
      });
    });

    But not exactly sure if this is the expected behavior?

    https://www.ads-software.com/plugins/participants-database/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    It’s probably not the desired behavior in this scenario, and I’ll write it up as an issue to look at. You may find the read-only works better on checkbox fields of you set them to read-only in the field definition and don’t try to do it in the template.

    Thread Starter cognoquest

    (@cognoquest)

    Yes, indeed it would be nice if I could make the fields read-only but these fields are part of a three step signup.

    The first step is the signup(multi-page), where the participants are requested to fill the information.

    The second step is the confirmation/agreement page, accessed via email. The confirmation displays some of the fields from the first step registration, this time in read-only.

    It may seem that the read-only fields are little overkill but this allows the registration to flow nicely in the third step which is the payment. Though I am still working on this step, until now the find job you have done with the pdb, (fingers crossed) the payment integration is well on its way. F.Y.I. I am using the PayPal PHP REST api to proceed with the payment portion.

    Again you have my gratitude.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fields checked vs disabled inconsistency during update’ is closed to new replies.