Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

260
Views
Checkbox Value Not Saved via Javscript (MSCRM)

The following JavaScript is triggered on a Microsoft Dynamics Portal (Basic Form), where I validate that user must check at least one of the checkbox.

  • Both checkboxes are not checked on form load
  • On form submit, there is a validation to check at least one is checked
  • Once either checkbox is checked, they cannot uncheck both checkboxes

Problem: The checkbox that is checked, is not saved when the form is submitted. Am I missing an additional save function?

$(document).ready(function () {

if (typeof (Page_Validators) == 'undefined') return;

var stepZeroValidator = document.createElement('span');
stepZeroValidator.style.display = "none";
stepZeroValidator.id = "stepZeroValidator";
stepZeroValidator.errormessage = "<a>Please provide your consent before submitting the application.</a>";
stepZeroValidator.initialvalue = "";
stepZeroValidator.evaluationfunction = function () 
{
if (document.getElementById('ccc_personaldataprotectionactyes').checked == false && document.getElementById('ccc_personaldataprotectionactno').checked == false){
return false;  //Apply Validation
}
else{return true;}
}
// Add the new validator to the page validators array:
Page_Validators.push(stepZeroValidator);

$("#ccc_personaldataprotectionactyes").bind('change', function () {
    if (document.getElementById('ccc_personaldataprotectionactyes').checked = true) {
        document.getElementById('ccc_personaldataprotectionactno').checked = false;
    }
    else if (document.getElementById('ccc_personaldataprotectionactyes').checked = false) {
        document.getElementById('ccc_personaldataprotectionactno').checked = true;
    }
});

$("#ccc_personaldataprotectionactno").bind('change', function () {
    if (document.getElementById('ccc_personaldataprotectionactno').checked = true) {
        document.getElementById('ccc_personaldataprotectionactyes').checked = false;
    }
    else if (document.getElementById('ccc_personaldataprotectionactno').checked = false) {
        document.getElementById('ccc_personaldataprotectionactyes').checked = true;
    }
});
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!