Hide/Show multiple data fields & Auto Time calculation

  • Darryl_Knight
    Asked on June 3, 2024 at 4:50 PM

    Hi,

    I Run a team of 30, where I am required to gather and track hours, personal start and finish at different times, some types of days dont require hours tracked ( Site and RnR Days) Just a check box so I know where they are.

    First issue with this timesheet im trying to make - is I cant work out how to show/hide from 6 (where they select location) it only has options of if filled/ is equal, but i cant tell it what field it should be looking for so most of the fields will be hidden on page 2

    For example If the personal selects Monday Workshop - On the next page it only brings up the hours selector for Monday workshop

    Tuesday and Wednesday they select SITE - so no additional box comes up

    Thursday and friday they select Tafe, it brings up the Tafe hour selector for both days

    I've done similar on other forms but can't seem to duplicate on this set-up.


    Next question - This I have been trying to do for weeks with multiple methods bur no luck

    if they select (or I change it to a type box) 0600 for start 2pm for finish and 30 min for lunch then how in each block can I get it to output worked hours? for this example 7.30 hrs

    For both of these options on very open to changing the input type, but my goal is to make this very easy for employess to do, and easy for myself to interpret at the end of the week

    Jotform Thread 15528321 Screenshot
  • Rose JotForm Support
    Replied on June 3, 2024 at 6:35 PM

    Hi Darryl,

    Thanks for reaching out to us for help. I am currently investigating your issue and need more time. I will get back to you shortly.

    Let us know if there’s anything else we can help you with. 

  • Rose JotForm Support
    Replied on June 3, 2024 at 6:56 PM

    Hi Darryl,

    Thanks for waiting. I viewed your form and I see a few Input Table fields on your form. Are you trying to display the next Input Table fields if the previous table is filled out? If yes, here's an example Show/Hide Condition:

    Hide/Show multiple data fields & Auto Time calculation  Image 1 Screenshot 20

    As for your calculation question, we do have the conditional logic feature that allows users to insert a calculation to a target field, here's the guide on How to Insert Text or Calculation Into a Field Conditionally. We can also guide you with the calculation condition, can you share more details and what are the fields to calculate and the target field?

    Let us know if there’s anything else we can help you with. 

  • Royce JotForm Support
    Replied on June 3, 2024 at 9:23 PM

    Hi Darryl_Knight,

    Thanks for lettings us know about your issue. I'm sorry you're having difficulties with this. You can use the Form Calculation widget, and Conditional Logic to show the Input Table field that needs to be shown. I've cloned your form, and applied the needed changes to achieve that functionality. Check out the screencast below:

    Hide/Show multiple data fields & Auto Time calculation  Image 1 Screenshot 260

    As you can see, the selected Input Table field is displayed on the next page. You can clone my demo form to make things easier, or you can do it on your end. Let me show you how to do it:

    First, let's add a Calculation Values to your Input Table widget:

    1. In Form Builder, click on the Gear icon of your Input Table widget, and click on the Options tab.
    2. Enter a value for each cell in your Input Table widget.

    Hide/Show multiple data fields & Auto Time calculation  Image 2 Screenshot 271

    Now, let's add a Form Calculation widgets to your form:

    1. Click on Add Form Element on the left side of the page, and click on the Widgets tab.
    2. Drag, and drop Form Calculation widgets on your form.

    Hide/Show multiple data fields & Auto Time calculation  Image 3 Screenshot 282

    Make sure to add sufficient numbers to the Form Calculation widget for each weekday.

    3. Click on the Wand icon of your Form Calculation widget.

    Hide/Show multiple data fields & Auto Time calculation  Image 4 Screenshot 293

    4. Copy the Form Calculation widget settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 5 Screenshot 304

    5. Repeat the same steps for all the weekdays.

    Then, let's change the checkbox on your Input Table widget to a radio button:

    1. Click on the Gear icon of your Input Table widget, and click on the Fields tab.
    2. Click on Radio Button in the Input Type section.

    Hide/Show multiple data fields & Auto Time calculation  Image 6 Screenshot 315

    Finally, let's set a Conditional Logic to show the selected field:

    1. Click on Settings in the orange navigation bar at the top of the screen, and in the menu that opens on the left side of the page, click on Conditions.
    2. Click on Add Condition, and choose Show/Hide Field.

    Hide/Show multiple data fields & Auto Time calculation  Image 7 Screenshot 326

    3. Copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 8 Screenshot 337

    4. Repeat the same steps for each cells for each weekdays.

    That's it. As for your question about the computation of the Start Time, End Time, and Lunch Break selected in the Input Table widget, you can add Short Text fields, and use Conditional Logic to calculate the selected time, and Lunch Breaks. I've applied the needed changes on the cloned version of your form. Check out the screencast below:

    Hide/Show multiple data fields & Auto Time calculation  Image 9 Screenshot 348

    As you can see, the time difference is being computed, and the Lunch Break is being deducted. You can clone the same demo form as a reference, and make the changes on your end. Let me show you how to do it:

    First, let's add a Short Text fields to your form:

    1. Click on Add Form Element on the left side of the page, and drag, and drop three Short Text fields on your form.

    Hide/Show multiple data fields & Auto Time calculation  Image 10 Screenshot 359

    Now, let's set the Conditional Logic needed to calculate the time, and deduct the Lunch Break selected on your Input Table widget:

    1. Click on Settings in the orange navigation bar at the top of the screen, and in the menu that opens on the left side of the page, click on Conditions.
    2. Click on Add Conditions, and click on Update/Calculate Field.

    Hide/Show multiple data fields & Auto Time calculation  Image 11 Screenshot 3610

    3. Copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 12 Screenshot 3711

    4. Enclosed those with a parenthesis, and divide them by 100.
    5. Click on the Function icon, and select Floor function.
    6. Enclosed those inside the Floor function parenthesis, and multiply them by 60.
    7. Enclosed those with a parenthesis.

    Hide/Show multiple data fields & Auto Time calculation  Image 13 Screenshot 3812

    8. Click on the Plus sign, and copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 14 Screenshot 3913

    9. Click on the Minus sign, and copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 15 Screenshot 4014

    10. Click on Add Condition, and click on Update/Calculation Field.

    Hide/Show multiple data fields & Auto Time calculation  Image 16 Screenshot 4115

    11. Copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 17 Screenshot 4216

    12. Click on Add Condition, and click on Update/Calculate Field.

    Hide/Show multiple data fields & Auto Time calculation  Image 18 Screenshot 4317

    13. Copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 19 Screenshot 4418

    14. Enclosed those with a parenthesis, and copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 20 Screenshot 4519

    15. Hover your mouse over that condition, and click on the Gear icon on it.

    Hide/Show multiple data fields & Auto Time calculation  Image 21 Screenshot 4620

    16. Click on Clone, and click on the Pencil icon of the cloned condition.

    Hide/Show multiple data fields & Auto Time calculation  Image 22 Screenshot 4721

    17. Copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 23 Screenshot 4822

    18. Click on Add Condition, and click on Update/Calculate Field.

    Hide/Show multiple data fields & Auto Time calculation  Image 24 Screenshot 4923

    19. Copy the condition settings pattern below:

    Hide/Show multiple data fields & Auto Time calculation  Image 25 Screenshot 5024

    20. Repeat the same steps for each weekdays.

    That's it. Let us know if you need further assistance.

  • Darryl_Knight
    Replied on June 17, 2024 at 11:21 PM

    Hi Rose,

    I think you need an award for this answer. this is increadble.


    However, As good as your walk-through is, I can not replicate it, even via cloning your formulas, or manually entering each one it, each time I try I get a different error, or something isn't working.

    Im up to about attempt 9 over the last few days

    In the conditions I have broken up the 5 formulas into each section - if you or someone could have a look as to why these arent working, or if there is an easier way please post it up

    https://form.jotform.com/241546193487465

  • Mary JotForm Support
    Replied on June 17, 2024 at 11:55 PM

    Hi Darryl,

    Please allow me some time to check on this, I will get back to you with an update.

    In the meantime, let us know if you have any other questions.



  • Darryl_Knight
    Replied on June 17, 2024 at 11:55 PM

    Hi, Sorry Royce, This is is my current not so working copy

    https://form.jotform.com/241688623914869

  • Mary JotForm Support
    Replied on June 18, 2024 at 12:29 AM

    Hi Darryl,

    I checked your working copy and my colleague's demo form, and your copy forms seems to be working as the demo form. Here is the result if Monday was chosen:

    Working Copy Form:

    Hide/Show multiple data fields & Auto Time calculation  Image 1 Screenshot 30

    Demo Form:

    Hide/Show multiple data fields & Auto Time calculation  Image 2 Screenshot 41

    Could you share which condition is not working as expected on your end?

    Once we hear back from you, we'll be able to move forward with a solution.