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

Question

Question

Forms 10.3.1 timepicker step value

asked on November 29, 2018 Show version history

Hi All,

 

I need to change the time picker values for the time control field with 15min interval.

 

Could some one please help?

Thanks

0 0

Replies

replied on November 30, 2018

Dear Aman,

 

  1. Please find the file :  C:\Program Files\Laserfiche\Laserfiche Forms\Forms\lib\jquery-timepicker\jquery.timepicker.min.js
  2. find the following  “c+= “   and next to it there should be 60, change it to the desired value (15 in your case).

 

it should work.

Regards,

Maher.

 

2 0
replied on November 30, 2018

Correct me if I'm wrong, but that would change it for all processes and all forms?

0 0
replied on December 2, 2018

yes it change it for all the processes, i did not try to embed the script into the form itself.

we can try it.

 

0 0
replied on December 2, 2018

Thanks Maher for your response, your solution works but i'm looking at changing it for one process only.

Thanks again for your help.

I found the below script from one of the post but it's not working.

Any suggestions.

//Time Picker 
$(document).ready(function () {
    $.getScript('/forms/lib/jquery-timepicker/jquery.timepicker.min.js', function() {
       $('.usertime input').timepicker({'step': 15, 'scrollDefault': 'now'});
      });
});

1 0
replied on December 3, 2018

hey arman,

 

i tried the following :

1- i copied to js file.

2- changed the variable

3- made a reference in the js section to the new file ($('<script src="http://localhost/forms/lib/jquery-timepicker/jquery.timepicker.min2.js"/>').appendTo('head'); )

 

it worked.

please try it

1 0
replied on December 3, 2018 Show version history

Hi Aman,

 

This link might assist you:

https://answers.laserfiche.com/questions/68749/Javascript-for-a-collection-using-TimePIcker#69064

 

Please be mindful, the script is setup for a generic server:

$(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' });
    }
  });
});

As in, 'http://server/forms/js/jquery.timepicker.js - you will be required to enter your Server details there so it is targeted within the Forms. 

 

If you have not yet enabled the ports externally, you can use it internally by specifying localhost/forms but if it is already ported, then use the full forms URL

 

 

EDIT - please use a normal field and not a time field for it to populate the times required. As in Single Line field.

With thanks

Ziad

1 0
replied on November 10, 2023

Is this still valid now? I tried looking for "c+=" and I can't find it in the file.

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

Sign in to reply to this post.