Jump to content

How to add auto current date & time fields v1.7


flyerkhong

Recommended Posts

Hello everybody,

 

May i know how to let the date & time in "Address" page to be:

- auto follow current date & time

- block from manual change the date & time.

 

because I'm trying to auto keep the last edit date & time made by admin in "Address" page.

 

please help me on this...

thank you and appreciate

 

image.png.bf27998bf0f7a1799cbbed0e6a3a80ec.png

image.png.0a851be138cd8caa56aff046522bb4bd.png

 

Edited by flyerkhong (see edit history)
Link to comment
Share on other sites

11 minutes ago, Guest said:

Which file did you want to edit?
File path ?
Upload it as an attachment.

Hi,

Appreciate for help.

 

The fields name is "Last Edit Date & Time" as attached image in "Address" page.

Do it able to become auto fill-up current date & time and block admin from manual changing the date & time?

 

Thank you and appreciate

image.png.a2d63d707f793cb4b179ac07347e77a1.png

Edited by flyerkhong (see edit history)
Link to comment
Share on other sites

$temp_fields[] = array(
                    'type' => 'html',
                    'label' => $this->trans('Last Edit Date & Time', array(), 'Admin.Global'),
                    'name' => 'editdatetime',
                    'html_content' => '<input type="text" name="editdatetime" value="'.Date('Y-m-d H:i:s').'" readonly>',
                    'col' => '2',
                );

 

Link to comment
Share on other sites

8 minutes ago, Guest said:

$temp_fields[] = array(
                    'type' => 'html',
                    'label' => $this->trans('Last Edit Date & Time', array(), 'Admin.Global'),
                    'name' => 'editdatetime',
                    'html_content' => '<input type="text" name="editdatetime" value="'.Date('Y-m-d H:i:s').'" readonly>',
                    'col' => '2',
                );

 

Hi,

Really appreciate for help.

A lot thanks.

Thank you and appreciate

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...