Date time and local time

babu65

New Member
Hi to all,
our target is recording date and hour when we save a form only at the first save and not at the later saves.

We have tried 2 different ways:

The first was used a field date time together a PHP plugin as you can see at this post https://fabrikar.com/forums/index.p...d-time-when-the-send-button-is-pressed.50643/ but unfortunately without success.

The second way, we have replaced the field datetime with timestamp so we have obtain the record of date and hour only at the first save. Greate!!

Unfortunately as we have read on the forum timestamp have a bug and it's no longer updated.
In fact we can't change the hour from GMT to local time.

How way we can follow for obtained the record of date and hour only at the first save and the local time?

Of course our server and Joomla are setup on local time.

Many thanks in advance for your kindly help.
 
Use the date or jdate element, and set "Default to current date" to Yes, and "Always record" to No.

-- hugh
 
Hi, thanks for your reply,
We have already try the way you suggest, but don't work because any time we save the form, the date and hour is update:(
 
We are sure of the setting, as you can see in the screenshot following.
Remember that the field working with PHP plugin
 

Attachments

  • screenshot.png
    screenshot.png
    34.6 KB · Views: 90
Remember that the field working with PHP plugin
If you are modifying the value in the php plugin then it's up to your code, this is obviously overriding the settings.
 
We have try more times at modify the values, but we don't are enough good with PHP.
Can you sugget us the right values?
Thanks
 
For what do you want to modify via php? "Default to current date" is for "timestamping" new records.
 
Babu65. I think you are trying too hard. You do not need to write any php code to do this, the date element works fine. I use this function all the time (multiple times per day) with no issues.
Here are the very specific settings:
Element type is "date" (that should appear in "Plug-in" )
Most settings are default. I've attached 4 screen shots showing the "Details" part of the element. This is where the relevant settings are. I would remove any php/java you have added to the form to manipulate it, the date element does what you want by itself. When you create a new record, the default date is set to the current date. I can be changed by the user. Once saved, that is in the database. If you open the record again, the date remains unchanged. The only validation I have is one that makes sure the date is not empty. flight_date1.JPG flight_date2.JPG flight_date3.JPG flight_date4.JPG
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top