D
|
david22585 11/19/2020 |
I have a button called with "Certificate" on it. Clicking this button pop-up a window that loads an external page with a certificate for the student to print. On that same row I have a pass/fail field called "score". The rows are edited using inline edit. My client said that if the student failed the course then they should not be able to access the certificate button. I've tried several says to hide or disable the custom button based on the value in this row field, but it is not working. Can anyone give me a hint on how to pull this off?
if ($data["score"] >= '70'){ if ($data["score"] == '1'){ if ($data["score"] == 'Pass'){
|
W
|
wfcentral author 11/19/2020 |
that sounds like what I'm looking for - but would it work on a row by row basis? below is a screenshot of what I'm dealing with. I actually have several columns that can marked as pass/fail (Level I, II, III) and if there is a "Fail" in any of those values then the button for that row "certificate" should not be available. |
![]() |
Admin 11/19/2020 |
Yes, it will work this way. Just in case here is the link to documentation: |
D
|
david22585 11/19/2020 |
that sounds like what I'm looking for - but would it work on a row by row basis? below is a screenshot of what I'm dealing with. I actually have several columns that can marked as pass/fail (Level I, II, III) and if there is a "Fail" in any of those values then the button for that row "certificate" should not be available.
|
W
|
wfcentral author 11/19/2020 |
placing this code on |
W
|
wfcentral author 11/20/2020 |
I must be doing something wrong and/or not understanding how this works. I just added some simple javascript to the dropdown for level1 on a row and I expect to see the javascript popup when I change that dropdown using inline edit for that row. However, nothing is happening. If I can figure out why this doesn't work then I can move on to the more advanced task of making it hide the certificate button when the user selects FAIL on the dropdown. |
![]() |
Admin 11/20/2020 |
List Page: After Record Processed event is executed on the page load. It doesn't execute after inline add or edit. |
W
|
wfcentral author 11/20/2020 |
List Page: After Record Processed event is executed on the page load. It doesn't execute after inline add or edit. What you can do is to show or hide the respective button manually using AfterInlineEdit event: https://xlinesoft.com/phprunner/docs/how_to_control_inline_add_edit_functionality_from_script.htm Section 'How to execute JavaScript code after the Inline Add or Edit'
|
W
|
wfcentral author 11/20/2020 |
that worked perfectly - thanks!
|
W
|
wfcentral author 11/20/2020 |
oops |