Timestamp element update on Edit = no

ontarget

Active Member
Hi using F4 Epsilon and J!4.3.4
I setup a Timestamp element as i wish to use it as a unique id in a list record.
I dont want the timestamp to change on edit.
I set this to "No" but the timestamp is still updating on edit.
The Yes / No toggle on the element doesn't seem to have any affect.
Is this a bug or is there some other means of not getting this to update.
Thanks for any pointers.
 
Hi, can you replace the code in the render function at line 79 of plugins/fabrik_element/timestamp/timestamp.php with the following amd let us know if that solves your problem. It seems to in my tests.

Code:
        $params = $this->getParams();

        $layout = $this->getLayout('form');
        $layoutData = new stdClass;
        $layoutData->id =  $this->getHTMLId($repeatCounter);
        $layoutData->name = $this->getHTMLName($repeatCounter);

        if ($params->get('update_on_edit') || !$data->__pk_val) {
            $date = Factory::getDate();
            $tz = new \DateTimeZone($this->config->get('offset'));
            $date->setTimezone($tz);
            $params = $this->getParams();
            $gmtOrLocal = $params->get('gmt_or_local');
            $gmtOrLocal += 0;
            $layoutData->value = $date->toSql($gmtOrLocal);
        } else {
            $layoutData->value = $this->getValue($repeatCounter);
        }

        return $layout->render($layoutData);
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top