Hi,
I want to use comments with timestamp on my work order app.
Now I'm using text box for comments on particular work order but anyone can edit or delete text in it without trace.
Thanks.
Make comments
Re: Make comments
Hi,
can you please explain in more detail what you try to achieve?
Do you want to disable the editing of comments, or build a comments log with timestamps, or?
can you please explain in more detail what you try to achieve?
Do you want to disable the editing of comments, or build a comments log with timestamps, or?
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.
Re: Make comments
I made a simple form to show what I want.
In red square is what I'm missing.
In red square is what I'm missing.
Re: Make comments
Hi,
in this case I would create 2 additional fields.
- comment
- comment_log
The comment_log is readonly and the will contain the log of all comments
In the hooks/TABLENAME.php file you can add to the after_insert and after_update a SQL statement that will copy the data from the comment field to comment_log field.
Hope that gives a starting point.
in this case I would create 2 additional fields.
- comment
- comment_log
The comment_log is readonly and the will contain the log of all comments
In the hooks/TABLENAME.php file you can add to the after_insert and after_update a SQL statement that will copy the data from the comment field to comment_log field.
Hope that gives a starting point.
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.
Re: Make comments
Hi,
I like pbötchers idea.
But it may be easier to have a new table for comments and create 1:n relation to that. Make users only ADD, but not EDIT records for this table and have a ID from your mastertable, timestamp field and a comment field. This way you also would be able to add more fields like username if you like.
Olaf
I like pbötchers idea.
But it may be easier to have a new table for comments and create 1:n relation to that. Make users only ADD, but not EDIT records for this table and have a ID from your mastertable, timestamp field and a comment field. This way you also would be able to add more fields like username if you like.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view