close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

timesheet inserts........

Thread began 8/22/2016 2:12 pm by Jamie | Last modified 8/24/2016 10:12 am by Ray Borduin | 1683 views | 14 replies |

Jamie

timesheet inserts........

I have set up a timesheet insert, results and update set of pages. (attached)

On the insert page, the user has 7 rows (days) which they can adds when they leave home, when they get on site, when they leave the site and finally when they get home. The user may only add 1 row of data, they may add all 7.

Now, on the insert page I need to do the following:

1. within the drop downs for each day, stop the next drop down from being able to select a time before the one that has been set in the preceeding drop down
2. if the user is adding data to a row, how to stop any of the inputs that are left blank (namely the travel start or travel end) that they are not included as part of the calculation on the results page.
3. cant figure out how to get data from the isert page to be added to the email form that is submitted to the site owner..I know you said to add a RS to the email template, but I couldnt get that to work..

On the results page, I'm not sure why the Travel hours and Total are not showing as 02:00 etc as it is in the On site time: http://prntscr.com/c937dy

Thanks for your help

Sign in to reply to this post

Ray BorduinWebAssist

1 and 2 are going to take custom script in javascript and/or php to pull off. 3 should just be a matter of using the insert ID that is stored in the session to filter the Recordset and using that to construct the email. I think this one is probably too complex to walk you through in the forums alone.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

re 1 and 2 thought that would be the case....will get in touch for a prem

re 3, not sure how to do this....have got timesheet_insert as a session variable in the binding panel just dont know how to us it to achiebve that..

Sign in to reply to this post

Ray BorduinWebAssist

You can use a simple recordset filtered with the session variable value: WADA_Insert_product_contents or whatever you have it set to in the insert server behavior.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

as soon as I add a recordset, the page stops sending....havent even set it up to filter

Sign in to reply to this post

Ray BorduinWebAssist

Try updating:

<?php require('../../../webassist/mysqli/rsobj.php'); ?>

to

<?php require_once('../../../webassist/mysqli/rsobj.php'); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

thats got it, not sure what the filter should be as what I have set up isnt working:

<?php
$WADAtimesheet_insert = new WA_MySQLi_RS("WADAtimesheet_insert",$DBConnection,1);
$WADAtimesheet_insert->setQuery("SELECT * FROM timesheets WHERE TimesheetID = ?");
$WADAtimesheet_insert->bindParam("i", "".(isset($_SESSION['WADAtimesheet_insert'])?$_SESSION['WADAtimesheet_insert']:"") ."", "-1"); //colname
$WADAtimesheet_insert->execute();
?>
Sign in to reply to this post

Ray BorduinWebAssist

Your insert page had the session name: "WADA_Insert_product_contents"

Did you update it?

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

yes I did....

<?php 
// WA DataAssist Insert
if (isset($_POST["Insert"]) || isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $PowerCMSConnection;
$WA_table = "timesheets";
$WA_sessionName = "WADAtimesheet_insert";
$WA_redirectURL = "timesheet_results.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
Sign in to reply to this post

Ray BorduinWebAssist

It seems like that would work. Is your email code after your insert code?

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...