I'm currently converting Yes/No values in display form from the checkboxes in new form. First round of display form I managed to convert the values but when I edit the form in Edit form, it still display the old values.
For example:
New form: Field A = Yes (Boolean Yes/No)
Display form: Field A = 1 (Converted)
Edit form: Field A = No
Display form: Field A = 1 (Expectation to display 0 instead 1)
Sample code
<script src="https://workspace.maybank.com.my/sites/sdlc/SiteAssets/jquery-1.10.0.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
var ValQ1_1 = $('td.ms-formlabel:contains("BAU Activities - URS, SR, IT initiatives, enhancements (Restricted to less than or equal to 20 IT Mandays)")').siblings(".ms-formbody").text()
var ValQ1_2 = $('td.ms-formlabel:contains("Production fixes - breakfix, remediation (compliance/audit/security), other than Incident Sev1/2, etc.")').siblings(".ms-formbody").text()
var ValQ1_3 = $('td.ms-formlabel:contains("Emergency or Urgent production fixes/change/RFC - with Incident Sev1/2 and/or ECAB")').siblings(".ms-formbody").text()
var ValQ1_4 = $('td.ms-formlabel:contains("Project - More than 20 IT man-days (per PMF - Project Management Framework)")').siblings(".ms-formbody").text()
var ValQ1_5 = $('td.ms-formlabel:contains("Project - Implementation of a new system/solution/application/infrastructure services")').siblings(".ms-formbody").text()
if (ValQ1_1= "Yes")
{
$('td.ms-formlabel:contains("BAU Activities - URS, SR, IT initiatives, enhancements (Restricted to less than or equal to 20 IT Mandays)")').siblings(".ms-formbody").text("1")
alert(ValQ1_1);
}
});
</script