You are viewing limited content. For full access, please sign in.

Question

Question

Javascript for a collection using TimePIcker

asked on December 16, 2014

I have a customer who is looking to utilize Laserfiche forms as a 'Time Card' system for their field employees.  The idea is to give the field employees a mobile device where they can log each job/call they complete.  I am using the timepicker.js for the time piece and it works GREAT on my first item, but I'm not sure how to apply these settings/scripts to my other objects in a collection.  I've included the code and a screenshot of the form below.

Thanks,

Nate

TimePicker.JPG
TimePicker1.JPG
TimePicker.JPG (41.3 KB)
TimePicker1.JPG (15.24 KB)
0 0

Answer

SELECTED ANSWER
replied on December 23, 2014 Show version history

Here's a simplified example that allows the timepicker to run in a collection:

$(document).ready(function () {
  $.getScript('http://server/forms/js/jquery.timepicker.js', function() {
    $('.cf-collection-block').on('click blur', 'input', times);
    function times() {
      $('.timeselect input').timepicker({ 'step': 15, 'scrollDefault': 'now' });
    }
  });
});

1 0

Replies

replied on December 22, 2014

Hey Nathan,

 

Can you please elaborate on what you'd like help with?  You're looking to apply what settings to what other objects?  Are the "Arrival" and "Completion" fields within a collection?  

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.