To make a field Mandatory using javascript
Hi,
I'm trying to apply calculated value attribute customization. I would like to make a field mandatory based on the value selection of another field. Can someone tell me on what function to be used to make a field mandatory using javascript ?
|
Accepted answer
It seems that what you are looking for is described in this article https://jazz.net/library/article/537
Have a look at the section "Dynamic required attributes". It should be a good advice to write your own attribute condition. Hope that helps Ralph Schoon selected this answer as the correct answer
Comments
Muthukumar C
commented Aug 06 '12, 9:19 a.m.
It works great for me !!! The advantage of using this method is that we can get a red * mark based on the value that we are selecting in base enumeration field (Condition field) |
3 other answers
Hi All,
I followed the link and enabled the dynamic attribute based on another enumeration value. But the * mark doesnt appear to indicate the mandatory attribute. I am using RTC V3.0.1.1 . I noticed that this issue is fixed - but is it in a later version of 3.0.1?
Thanks. |
Hi Valli,
It should work when the condition returns true...
To ensure that, please add console log in the script and check the value of base enumeration and literal.
Or some times, it will take effect after RTC Client restart. post your script for further analysis
Regards
Muthu
|
Hi Muthu, Script does work - it prevents the workitem save - saying the attribute is mandatory. The problem is that there is no red * indicating that the attribute is mandatory.Just wondering if its a known issue for 3.0.1.1? RTC Version - 3.0.1.1. Comments
Muthukumar C
commented Mar 05 '13, 2:00 a.m.
Hi Valli, Somebody from Jazz team should confirm this. Its working for me in both 3.0.1.2 and 4.0.0.1
VK L
commented Mar 05 '13, 3:25 a.m.
Noticed that Wokitem 133631 is related to this - but not sure if its fixed for
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.