How to change the alignment of a button of an alert
Hi. I have created an alert after the user needs to cancel a record. The problem is that by clicking on the "ok" of the alert the user also opens a record again. I want to align the "ok" of the alert to the left so solve this problem. Does anyone know how to do this?
12 replies
-
Hi, alternatively you can use the dialog function like below:
let check := dialog("Alert!", "Are you sure that you want to delete this record?", ["YES", "NO"]); if check = "YES" then delete this end
said:
The problem is that by clicking on the "ok" of the alert the user also opens a record againI am not sure how this could happen. Can you share your code?
-
Yes, you can have the button align left. You need to put this code in a Formula field and you can't hide the field using "Display field only, if:". Instead you have to hide the label and set the background color of the Formula field to the background color of the form.
html(" <style> .nx-alert .nx-hspace-flex {display: none;} </style> ")
-
But if the button is moved to the left and then the user continues to double click then won't they open the underlying image instead (assuming you don't have this locked down) - isn't it easier to educate the user to the fact they only need to click the okay button Once?
I personally would not delete but set a "delete" flag to hide the record instead (or move it to an archive) and if required delete x records in batches behind the scenes later on.
Content aside
- 4 mths agoLast active
- 12Replies
- 74Views
-
5
Following