Forums

Multipage forms - timer fill out a form

sylwekb 25 Apr, 2016
Is it allowed to form as a e-mail result of time filling out the form?
eg such as "filling in the form lasted 30 minutes"
How does it perform?
GreyHead 25 Apr, 2016
Hi sylwekb,

I've never seen this asked before but I guess that you could do it. Add a hidden element to the first page and set the value to the time the page is loaded; add a Custom Code action before the email action to check the saved start time compare it to 'now' and add the elapsed time to the email.

Bob
sylwekb 25 Apr, 2016
Can you describe step by step how to do it? My point exactly which tab edition of the form; enter to do so.
sylwekb 25 Apr, 2016
How to give the form filling time eg 30 minutes and give it as a result of sending an e-mail?
GreyHead 26 Apr, 2016
Hi sylwekb,

It would something like this

Add a hidden input to your form named start_time

In the On Load event add a Custom Code action before the HTML (render form) action with code like this
<?php
$form->data['start_time'] = time();
?>


In the On Submit event add a second Custom Code action with code like this
<?php
$form->data['complete_time'] = ( time() - $form->data['start_time'] ) / 60;
?>
!! Not tested and may need debugging !!

Add {complete_time} to the email template which will give you the time difference in minutes,

Bob
This topic is locked and no more replies can be posted.