How to put check mark on Input Table and update the timestamp column

  • philberg10
    Asked on June 19, 2018 at 8:14 PM

    Please look at the screenshot and link. I need to put a check mark in the "OK" box and have it timestamp the "Time" box for each row. Is there some css or other way to do this?

    Jotform Thread 1503758 Screenshot
  • jonathan
    Replied on June 19, 2018 at 10:58 PM

    Unfortunately the condition logic you wanted to apply will not work if using the Input Table field only similar to what you have. Calculation condition is available if calculations were to be done between the existing fields in the input table.

    User guide: https://www.jotform.com/help/343-How-to-Perform-Form-Calculation-in-the-Matrix-Field

    The alternative workaround you may want to consider is to use multiple individual input fields. This way you can create calculation conditions to get the timestamp value and put it on another field/column.

    Example:

    1529463291zzz 2018 06 20 10 Screenshot 10

    In the example image above, if the OK field is filled in, timestamp is calculated using conditions and then copied to Time field.

    A more advance but can be complex for you is using the form full source code. When using the form source code, you can inject your own custom function code to trigger the timestamp script(javascript) and fill in the Time field.

    I hope this help. Let us know if you need further assistance.



  • philberg10
    Replied on June 20, 2018 at 1:41 PM

    Good work around - Can you illustrate the steps to accomplish this.

    In the example image above, if the OK field is filled in, timestamp is calculated using conditions and then copied to Time field.

  • roneet
    Replied on June 20, 2018 at 3:18 PM

    Hi,

    I am working on the steps,i will provide you with a solution shortly



  • philberg10
    Replied on June 20, 2018 at 3:28 PM

    Thank you

  • roneet
    Replied on June 20, 2018 at 3:51 PM

    Hi,

    Please follow the steps to use multiple individual text field to get the timestamp value and put it on another field/column


    1.Drag Shortext Entry from Form elements

    1529524070shortext1 Screenshot 10

    2.Then use the shrink functionality to shrink the size of the field and then in the CSS editor decrease the textbox height and width.

    1529524146shrink1 Screenshot 21

    3.Then add a Date picker field from the Form elements and make it hidden , so it will not be shown to user.

    4.So we will create a condition which will copy the date and time to timestamp field from the date picker field if the OK field is filled.

    1529524240condition3 Screenshot 32

    5.I  have created a test form to test the conditions.Feel free to clone it : https://form.jotform.com/81705669626972

    1529524308test Screenshot 43

  • philberg10
    Replied on June 20, 2018 at 4:06 PM

    If you make multiple rows will it stamp the new current time in each row? Meaning will each row reflect the actual time you entered the 1 in the OK field?

  • roneet
    Replied on June 20, 2018 at 4:48 PM

    If you make multiple rows will it stamp the new current time in each row? Meaning will each row reflect the actual time you entered the 1 in the OK field?

    Then we need to create another conditions for each OK field that if it is clicked then it will copy the current time.

    I have modified the above test form to have multiple OK field,so now the form looks like this :

    1529526729modifieed Screenshot 10

    And i have added another condition which copies the current time when the second OK field is filled :

    1529526811conduohfovhkfs Screenshot 21

    I have modified the existing test form to have multiple fields.Feel free to clone it.


    https://form.jotform.com/81705669626972


    Hope this helps!

  • philberg10
    Replied on June 20, 2018 at 5:25 PM

    I tried the test form. I waited 2 minutes between entries and both stamped the same time in the timestamp field. Both are using the time when the form was opened.

  • jonathan
    Replied on June 20, 2018 at 5:48 PM

    I apologize for the blunder. I also found a loophole in the workaround I suggested.

    You can check the original form I used to test here https://www.jotform.com/81697609217972

    The Timestamp value is being taken from a hidden Date field using calculation condition.

    But unfortunately the Date field value will refresh once only -- when the form loads initially.

    1529531057zzz 2018 06 21 05 Screenshot 10

    To refresh the timestamp, it will need to reload the form, which can be problem as it will also reset all existing value in the form.

    To fix it, we will need to use a different field/widget that have running date/time value that can be used.

    I will look for alternative workaround. I will post update on this thread when I have it.

    Thank you.