I’d like to be able to make a field rendering conditional based on a secondary model on the page (not the one that the field is associated with). In my case, it is to make a field optional based on the User object (based on the logged in user), but on a Case field editor (which is a new empty case). Currently the field rendering feature does not allow this capability - something to think about for a future release…? I can use a snippet to examine the secondary model, and go into the DOM and hide the fields (or even easier, hide the entire Field Editor). But of course the field validation still runs - causing the page to be impossible to save. The best answer I’ve found … though I’m a bit worried about my approach … is also use a snippet to locate the model, traverse into registeredLists and locate my Field Editor, and within that locate my fields within the requiredItems object and delete them. Which does seem to work, though I’m diving pretty deep into your data structures. Is this a bad or good practice? Should I be worried about side effects and/or future updates breaking me? I’ve seen other comments here about using a custom field renderer, but the validation strategy always seems to be to use an alert(…) call - which is a different user experience for the validation than the other fields - something I’d like to avoid. Is there a better way to approach conditional field validation across models? Thanks, - Chris
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.