how to setup a simple time stamp with button

samoht 22 Oct, 2008
hello all,

I want to have a form that has a button to click that will produce the current time HH:MM:SS in a textbox that can be saved to a database

How would I do this?

Set up a javascript function for the onclick event of the button?
Max_admin 22 Oct, 2008
Hi,

Set up a javascript function for the onclick event of the button?



yes, just google this! "javascript get current time"

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 22 Oct, 2008
thanks,

my question now is how do I retrieve the stored time in another form.
Basically I have a time-sheet form to record time in and time out per client. Now I need a form that will look up all entries between a date range then display the results in separate tables (by client) and email the results.

I downloaded the "Chrono Connectivity" component - but am unclear on how to use this?
can you help me set up this second form.

Thanks
Max_admin 22 Oct, 2008
Hi samoht,

Connectivity hasa tutorial from the website home page, working with date ranges in SQL will need to be done carefully and in correct formats, better to see some example online first, then you can write a correct SQL to add to connectivity!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 22 Oct, 2008
Connectivity doesn't seem to have the email functions that Chrono Forms does?

Or am I missing something?
Max_admin 22 Oct, 2008
Connectivity to view data on both admin/frontend and to show forms on admin only!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 22 Oct, 2008
So to email a form that pulls info from another forms table - don't use connectivity - just use another Chrono form?

How do I connect to the table that I want to pull data from?
Max_admin 22 Oct, 2008
this will need some PHP coding, give me a general idea on what you are trying to do and I will try to show you a code example!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 22 Oct, 2008
well I have a timesheet form to record a client name time in and time out plus work description

I need a form to pull these records with in a certain date range (usually just 14 days behind today) Then organize the results by client.
This form will create a separate invoice per client. Right now I can have each invoice showing up on one form and emailing to one person.
Max_admin 22 Oct, 2008
Ok, here is an example code but I don't know all your project details

global $mainframe;
$database =& JFactory::getDBO();
$database->setQuery( "SELECT * FROM #__chronoforms_sometable WHERE clientid='".$clientid."' AND datein > ".(date("Y-m-d H:i:s") - 14) );
$record = $database->loadObject();
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.