Hello,
Does anyone know what the code is and where it should be placed to change a non-required field to required if a condition is met? For instance, If another field's value called Eff Percentage is less than let's say 95.0, then the Notes field would then become a required field in the Detail View?
Thanks much,
David
Change field to Required If Condition met
-
- Veteran Member
- Posts: 101
- Joined: 2019-05-26 18:38
Re: Change field to Required If Condition met
Hi,
you can add some code to the hooks/TABLENAME-dv.js file (create it if it does not exist)
Add something like
This would make your field mandatory.
!! This will not alert you directly with a Popup message like AppGini does. This would need some extra code.
you can add some code to the hooks/TABLENAME-dv.js file (create it if it does not exist)
Add something like
Code: Select all
if (CONDITION) {
$j('#FIELDID').attr('required', true)}
}
!! This will not alert you directly with a Popup message like AppGini does. This would need some extra code.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
-
- Veteran Member
- Posts: 101
- Joined: 2019-05-26 18:38
Re: Change field to Required If Condition met
As always, thank you sir! Very much appreciated.
I did change the .attr to .prop and the AppGini Popup message also showed up.
Thanks again,
David
I did change the .attr to .prop and the AppGini Popup message also showed up.
Thanks again,
David