This topic is locked
[SOLVED]

 Store the date and time when a valueof a field is modified

10/3/2016 5:30:08 AM
PHPRunner General questions
Karlo author

PHP-Runner 9.0:
In a table there is a field as a checkbox and a field as a date. If the value of field "checkbox" is set to "true", the date of the change should be saved in the field "date".
Someone has an idea how this can be implemented?
Thank you in advance
Karlo

Sergey Kornilov admin 10/3/2016

You can try something like this in events like BeforeAdd and BeforeEdit:

if ($values["checkbox_field"]==1)

$values["date_field"]=now();
Karlo author 10/3/2016



You can try something like this in events like BeforeAdd and BeforeEdit:

if ($values["checkbox_field"]==1)

$values["date_field"]=now();



Thank you, Sergey, works perfect!!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=80403&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />