Title: testing on timepicker
Last modified: September 29, 2020

---

# testing on timepicker

 *  Resolved [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/)
 * Hello ,
 *  I’m trying to test on a timepicker field, if the time is after 17.00 jours.
   
   The formula i made is as follows: The field the formula is in is called “Efter
   17”.
 * var tid1 = (RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
   
   $$field_rnField6$$.GetField(current,’rnsluttid’)))/ 60; if($$field_rnField6$$.
   GetField(current,’rnmoedetid’).numericalvalue >= 61200000) return tid1; else 
   return 0;
 * But it only says “undefined” .
    What do i do wrong ? best regards Robert
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftesting-on-timepicker%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13468464)
 * Hello!
 * Could you send me an screenshot of the formula so i can see the name of the fields
   instead of only the ids please?
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13470457)
 * Hello
    did you get my mail with the screenshots ?
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13471158)
 * err no sorry, didn’t get it.
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13471171)
 * Oh, sorry .
    trying again : I can’t paste a screenshot in here, but the field
   names are : Moedetid (timepicker) Sluttid (timepicker)
 * var tid1 = (RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
   
   $$field_rnField6$$.GetField(current,’rnsluttid’)))/ 60
 * if(new time($$field_rnField6$$.GetField(current,’rnmoedetid’)>=61200000))
    return
   tid1;
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13475526)
 * Hello ,
    Did you get a chance to look at this ? Its the only thing i’m missing
   before setting the form into production 🙂 best regards Robert
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13476088)
 * Oh i noticed something.
 * Could you add this to the end of the formula please?
 * return ”;
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13476149)
 * Hmmm, where schould i place the return “; ?
 * var tid1 = (RNMinutesDiff($$field_rnField6$$.getfield(current,’rnmoedetid’,$$
   field_rnField6$$.getfield(current,’rnsluttid’))
    if (time($$field_rnField6$$.
   Getfield(current,’rnmoedetid’) >=61200000)) return tid1;
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13476294)
 * at the end of the formula, i belive that should fix the undefined thing as you
   are not returning anything when the condition is not met. The return ” should
   fix it.
 * Regards!
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13476467)
 * sorry to bother you , but i cannot get it to work .
    can i ask you to take a 
   look at it again ?
 * var tid1 = (RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
   
   $$field_rnField6$$.GetField(current,’rnsluttid’))) / 60; if (new Time ($$field_rnField6
   $$.Getfield(current,’rnmoedetid’)) >= 61200000) return tid1; Else return ”;
 * Thanx a lot!
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13476811)
 * Probably the problem is that is else not Else, cases matter in the code. Also
   it is not needed, if you want you can remove it.
 * If this doesn’t fix the problem, could you put this line at the very beginning
   of the formula?
 * debugger;
 * this will help me debug the formula to inspect what is the problem.
 * Regards!
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13477381)
 * Arrghh. must be me that is stupid 🙂
 * The formula is right now:
 * var tid = RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
    $
   $field_rnField6$$.GetField(current,’rnsluttid’)) /60;
 * if (new Time ($$field_rnField6$$.GetField(current,’rnmoedetid’)) >= 61200000)
   
   return tid; else return ”;
 * But is just looping when i start up the page .
    tipform.nocable.dk/mjutidsreg
 * Also when i place ‘Debugger;’ at the very beginning of the site.
    Cleared all
   caches both on the iste and the client. Can you login to the site ? I think you
   have the login and password already. Else send me an email in private on [rlw@nocable.dk](https://wordpress.org/support/topic/testing-on-timepicker/rlw@nocable.dk?output_format=md).
   Thanx a lot for your excellent support! Is there anywhere in the dokumentation,
   where you have the possibilities with conditions and formulas with timepickers?
 * br
    Robert
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13478716)
 * OH sorry i can’t create tickets myself, could you contact me throw this form 
   please? [https://smartforms.rednao.com/contactme/](https://smartforms.rednao.com/contactme/)
 *  Thread Starter [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * (@rlwnocable)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13490389)
 * Hello,
    Thanx a lot ! I got it to work 🙂
 * Best regards
    Robert

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘testing on timepicker’ is closed to new replies.

 * ![](https://ps.w.org/smart-forms/assets/icon-256x256.jpg?rev=1226707)
 * [Smart Forms - when you need more than just a contact form](https://wordpress.org/plugins/smart-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-forms/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [rlwnocable](https://wordpress.org/support/users/rlwnocable/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/testing-on-timepicker/#post-13490389)
 * Status: resolved