We're working on converting our HR Personnel Action form into LF and we have a lot of rules we'd like to apply as far as what should be required or read-only based on what action is selected. We have a ton of lookup rules associated as well, so we'd like to open the form with 'new hire' as the default action, but I can't make the rules apply correctly without selecting another action and then going back. Is it possible to force a change or another way of doing it, when the form opens, where it thinks someone selected it? I think this may be built in with Forms11, but we're not there yet.
Below is what I'm starting with and would like to build off that for each action. Any insight or ideas would be greatly appreciated. Thanks!
$(document).ready(function () { $('.chkReason input').change(function () { var isChecked = $(this).is(':checked'); var selectedOption = $(this).val(); if (selectedOption === 'New_Hire' && isChecked) { $('.req label').append('<span class="cf-required">*</span>'); $('.req input').attr('required', 'True'); } else { //if box is not checked $('.req span.cf-required').remove(); $('.req input').removeClass('required').removeAttr('required'); } }) })