Need help with either conditions or better widget on a form

  • francinec1
    Asked on September 14, 2018 at 10:59 AM

    I'm trying to use a form where people are logging activities.

    Some activities have assigned values that should be sent with the activity selected and should not be modified, but some will require entry of a numerical value, and some will require the entry of a text value.

    I've tried creating a pick list that would only show the fields if certain activities were displayed, and hide if they are not.

    I've tried to use several of the widgets, but none of them are doing what I need them to do.


    Wondering if you can suggest how to do what I want.


    this is the form


    https://www.jotform.com/build/82465139812157


    Ideally, if I could have a table that allowed selection of an activity from a grid, then the value associated with it  (if pre-defined) or entry if it was not defined as a requirement, and then if it's one of the areas we have to require more information, I'd love someone to point me to a widget that will do this.  

    I tried just using the pick list and then assigning to "show" the Hours field if the selection was made and hide it if it wasn't.  It working for the "Booth" field, but not the hours.  Hours seems to always show.

    Here is what I put together in excel, so you can see exactly what I am trying to do.  If they check the box, the activity and value needs to be sent wit the form.  If the * is there, it is dynamic entry based on the selection, or if it is a requirment to identify the hours or the area to enter either the numerical value, or the text value.  


    Checkbox/Picker Activity Value Area/Booth Date
    ☑︎ Attended PTO Meeting 1 Hour   *
    ☑︎ Building Clean Up/Organization (Enter Hours Worked)*   *
    ☑︎ Chaperone/School Trip 1 Hours   *
    ☑︎ Draw Down Chair 5 Hours *  
    ☑︎ Draw Down Setup/Breakdown (Enter Hours Worked)*   *
    ☑︎ Donated Food or Money for Lunches 1 Hour   *
    ☑︎ Fall Festival Setup/Breakdown (Enter Hours Worked)*   *
    ☑︎ Fall Festival Candy Donation 1 Hour   *
    ☑︎ German Fest Bakery Item (Enter Hours Worked)*   *
    ☑︎ German Fest Booth Support (Enter Hours Worked)* * *
    ☑︎ German Fest Chair 5 Hours *  
    ☑︎ Lunch Fairy 2 Hours   *
    ☑︎ PTO Officer 10 Hours    
    ☑︎ Uniform Sale  3 Hours   *
    ☑︎ Other (List Specific Activities  (Enter Hours Worked)* *

    *


    Can you advise which widget will do this? Or, figure out how I can only have the hours worked field show up if it needs to based on the conditional logic?


    I'm not sure if there is a bug, or why I can't get the Hours field to show up only when I need it to, but that's the crux of my issue.  

    Thank you in advance,

    Francine Carstensen

  • BJoanna
    Replied on September 14, 2018 at 12:14 PM

    We do not have a widget that will fit your need. However, that should be possible to achieve with the conditional logic.

    I inspected your form and I saw that you listed activities inside of dropdown field, so I assume that the users should be able to select only 1 activity. 

    Here is a demo form that I created - https://form.jotform.com/82564705330959 

    Feel free to test it and clone it


    Some options that were already set inside of your dropdown field are missing for the example you provide, so I did not include them, but you can update your conditions and add does options as well. 

  • francinec1
    Replied on September 14, 2018 at 1:43 PM
    Nope.
    Still not working.
    When I tried the first one, it filled in “Booth Worked” as 1 hour. (Great, I can just change the label)
    But, if I select the next on (Building Clean Up/Organization), where it requires hour entry, nothing appears.
    So for these activities, I need the hours (booth worked) with the pre-populated values.
    But, when they select the following activities I need a box that pops up that forces them to enter the Hours worked. That’s not happening. It’s duplicating the information and not allowing the user to input the value.
    Building Clean Up/Organization
    Draw Down Setup/Breakdown
    Fall Festival Setup/Breakdown
    German Fest Booth Support
    Library Book Fair
    Other (List Specific Activities)
    I think what we need is to hide the configured “Hours Worked” that is a duplicate and have a new input field that pops up that allows for input of the value of the actual hours worked. (Could be 1, 2, 3, etc. Should allow for at least double digits.
    Not sure how to accomplish that.
    Can you please advise?
    This is on the following form.
    https://www.jotform.com/build/82565572212153
    Thank you.
    Francine Carstensen
    ...
  • AshtonP
    Replied on September 14, 2018 at 2:28 PM

    This is possible using conditional logic what you mentioned is a correct approach. 

    Please set an UPDATE/CALCULATE VALUE condition like below. You can use this to populate the values in the Booth Worked field. 

    67459 Selection 804 Screenshot 10

    The conditions to Hide/Show fields are already set up so you can populate the fields based on the drop-down selection. 

    67460 Selection 805 Screenshot 21

    I have created a few conditions for you in this form https://form.jotform.com/82565993872980, you may take a look.

    Here is the example - 

    67462 test fine Screenshot 32

    You can create conditions and this should work as shown above. Related Guide: Smart-Forms-Using-Conditional-Logic 

    Do let us know should you need further help.

  • francinec1
    Replied on September 14, 2018 at 3:43 PM
    Is there a way I can talk directly with someone? I really want to fix the form I already have built, and the description below and the example is not doing what I need it to do.
    I’d rather finish the form I started and need the help in getting the form finished.
    I have the hours pre-determined for the fields that have specific Activities and hours.
    The ones that don’t, I just need the “Hours Field” to show for the user to input them. And to show the hours if they are already pre-defined. You keep changing it to “Booth” which is only applicable for one specific activity.
    Then, if the Activity is German Food Booth I need it to have a defined value of 5 hours and then open up a text field to input the booth worked. That is the only activity that requires this.
    The rest either have pre-defined hours, or need the user to input actual hours worked, but I don’t want someone to put in for example that attending a PTO meeting gets them 5 hours, it needs to be pre-set at one and not editable.
    The form is nearly finished, and I’ve been working on it for two days, I just want it to be finished.
    Is there a way for me to work with someone directly to finish my form?
    Thank you
    Francine Carstensen
    251-213-3522
    ...
  • David JotForm Support Manager
    Replied on September 14, 2018 at 6:39 PM

    Unfortunately, we do not have support over the phone. After reading your requirements, I can tell you that our form builder does not have a specific widget that could accomplish what you need to. However, we will be glad to give it a try using our available features. 

    Here is my workaround, I tried to create a table similar to the one you have shared in your screenshot, so:

    - I used a Multiple Choice field.

    - And and Input Table field.

    I customized them by:

    - Increasing the form width a little bit.

    - Shrinking the fields and positioning side by side: https://www.jotform.com/help/328-How-to-Position-Fields-in-JotForm 

    - Customizing the fields with the following CSS code: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes 

    .form-matrix-row-headers {

        display : none !important;

    }

    .form-matrix-table > tbody > tr:first-child > th:first-child {

        display : none !important;

    }

    #label_131 {

        display : none !important;

    }

    .form-checkbox-item:not(#foo) {

        height : 35.8px !important;

        padding-bottom : 0px !important;

        border-bottom : 0.1px solid;

    }

    #id_131 {

        margin-left : -30px !important;

        padding-left : 0px !important;

        padding-right : 0px !important;

    }

    .form-checkbox-item label {

        margin-top : 5px !Important;

    }

    .form-matrix-column-headers {

        background: none !Important;

        border: transparent !Important;

    }

    .form-matrix-column-headers  {

        font-family: "Open Sans", sans-serif;

        color: #ffffff;

        font-size: 0.95em;

    }

    .form-matrix-table tr > td > input{

        width: 110px !Important;

    }

    .form-matrix-values {

        background: transparent !important;

    }

    So, I go this final look:

    1536963244look Screenshot 10

    I decided to give it a try with the Input Table field, because it is possible to input results, and calculations into the each cell of the table, example: https://www.jotform.com/help/414-Calculate-Values-in-the-Input-Table-Through-Condition 

    1536963631results Screenshot 21

    So, I have created conditions to populate the first 3 fields(that requires auto-population based on a selection). Here is how the condition looks for the first cell:

    1536963830condition Screenshot 32

    Here is the link to my demo: https://form.jotform.com/82566359574976 

    You can clone it in your account to inspect it further: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    I understand that this is not a complete solution, but my intention was to at least give you an idea, or a little help to try to build the type of form you want to.


  • francinec1
    Replied on September 14, 2018 at 8:43 PM
    This is not what I want it to do. This is WAY too busy.
    Is there not a way to just fix it the way I want it to work?
    All I want to do is to have a selected value, a text field assigned to it for certain entries and then an input field if the value doesn’t have a pre-set value.
    And, hide the input field if it has a pre-defined value.
    So far, not impressed with the support, largely because I can’t actually talk to someone to fix the problem.
    Please advise.

    ...
  • Nik_C
    Replied on September 15, 2018 at 3:08 AM

    I'm not sure why the form provided by my colleague David is not working for you, since it is doing what you described:

    1536993433Screen Shot 2018 09 15 at 8 Screenshot 10

    I assume only what it might not work is to actually show the text box on checking the options?

    I'm afraid that it will not be possible with that setup unless the text fields on the right are broken into separate fields.

    Could you please let us know if this is what you want:

    1536995255screencast Screenshot 21

    I had to remove the theme and increase the width of the form. Each pair Value/Area is a separate text box pair and it is shown conditionally based on selection on right, in the same time it is populated conditionally.

    That can be adjusted with CSS so the fields are in the proper row.

    Please confirm.

    Thank you!

  • francinec1
    Replied on September 17, 2018 at 11:43 AM
    If you are going to handle it this way the Text Box that currently says “Value” needs say “Hours Worked”. The text box that says “Area/Booth/Date” needs to say "Area or Booth”.
    I still don’t understand why we can’t do what I originally asked with the drop down, but you seem insistent on handling it this way. The way I had it was much cleaner if you could just get the conditional field to work properly.
    What I want is to have the condition selected in the drop down display either the pre-determined value I have in my excel spreadsheet. And ONLY allow input into that field if it’s one of these activities.
    The original form I create is doing that, but for some reason the conditional logic is not populating the fields correctly.
    Your way may be cleaner from a forms perspective, but to a user, this is way less overwhelming.
    I’d still prefer if we can correct the issue on my form https://www.jotform.com/build/82565572212153 to correctly show inputting the “Hours” if they are not know, as in the following selections:
    Building Clean Up/Organization
    Draw Down Setup/Break Down
    Fall Festival Setup /Break Down
    German Fest Booth Support
    Other (List Specific Activities and hours worked)
    It works fine for the hours known and doesn’t display extra.
    But it is not allowing the entry of hours worked if the conditions are the ones necessary, It displays a duplication of the field, and no ability to enter.
    This is the only conditional field that isn’t working on the form. Everything else is exactly how I want it.
    Can you not just correct this issue, or tell me how to fix it?
    Even when I ask for the area/booth it works.
    Can you please just figure out to fix the one value not working on my form? https://www.jotform.com/build/82565572212153
    Thank you
    Francine Carstensen
    ...
  • roneet
    Replied on September 17, 2018 at 12:49 PM

    Allow me some time. I'll get back to you ASAP.

    Thanks.

  • roneet
    Replied on September 17, 2018 at 1:10 PM

    I see you are using the Dropdown values to manipulate data whether it needs to be entered by the user or it comes with pre-filled values. The manual entry one was not working in your form as the drop-down calculation key's value was blank and while you were manipulating the conditions it is simply copying the key into the value.

    1. What I tried to do was to assign a value to it "Enter a value" for those which needs to be filled by the user.

    Need help with either conditions or better widget on a form Image 10

    Need help with either conditions or better widget on a form Image 21

    2. Add a similar short text entry field named "Hours Worked" and written a condition that if the first "Hours Worked" filled has a value "Enter a value" it will hide it and will show a new blank "Hours Worked" field which I have added.

    Need help with either conditions or better widget on a form Image 32

    Here's my cloned Form:

    https://www.jotform.com/82594538825975

    Feel free to clone and test.

    Thanks.

  • roneet
    Replied on September 17, 2018 at 1:42 PM

    Here's a screencast representation for the same:

    1537206085form Screenshot 10

  • francinec1
    Replied on September 17, 2018 at 3:43 PM
    OK this is getting closer, but know, it appears the hours are editable. They should not be for certain circumstances.
    How do we fix that?
    Again,
    These are the values I want the user to input from my drop down list. ONLY the yellow ones should be driven by user entry. The rest of the list should be locked down/Hardcoded/Not editable.
    None of the others should be editable. I can edit all of them right now, which I do not want.
    Please advise.
    I’d really like to finish this today, this has been going on since last week and in my opinion, not having a chat or call available is very frustrating.,
    Francine
    ...
  • Richie JotForm Support
    Replied on September 17, 2018 at 5:03 PM

    You can set your hour field to read-only. This would prevent your user from filling up that field.

    Need help with either conditions or better widget on a form Image 1 Screenshot 30

    You can use the Enable/Required Condition to enable the Read-only field to allow input .

    Need help with either conditions or better widget on a form Image 2 Screenshot 41

    Please give it a try and let us know if the issue still remains.

    Thank you.

  • francinec1
    Replied on September 17, 2018 at 6:43 PM
    No. It’s not working. Now it’s hiding the fields that show the hours worked in all cases
    We need it to show the hours work at all times. But, require an entry ONLY in the highlighted selections. If it’s not in one of the highlighted values it should be non-editable.
    If they are not highlighted, the value I pre-determined should show and not be editable.
    I’m not sure why this is such a problem. This is not a major request.
    Seriously not impressed with the support. This should be a simple, easy thing. But, you keep passing it off to other people and I’m getting different suggestions. If someone would CONTACT me directly and work with me I suspect we could have this knocked out in less than 20 min.
    ...
  • Kevin Support Team Lead
    Replied on September 17, 2018 at 8:46 PM

    We need it to show the hours work at all times. But, require an entry ONLY in the highlighted selections. If it’s not in one of the highlighted values it should be non-editable.

    If they are not highlighted, the value I pre-determined should show and not be editable. 

    As  I understand your requirement, you want to have some fields editable and some of them hidden; however, it's not clear which fields should behave like this. If the hidden and non editable fields are fixed then you may hide them and set them as read only under the field settings, just like my colleague mentioned on the previous response. Now, if they need to be hidden and read only for certain cases, then you may refer to our guides about it and implement them on your end: 

    https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    https://www.jotform.com/help/371-How-to-Enable-Disable-Fields-Using-Conditional-Logic 

    Note that we do provide chat support between 9 AM to 7 PM EST; however, for this kind of requests we always recommend to use this forum since we do have other users in our chat queue. 

    We have been providing workarounds to achieve your requirement since it could not be performed exactly as you need with our current forms elements and features, if requirements are very specific we do allow users to download the form's source code, this way you can customize the form further and in case you do not have the programming knowledge you may hire a developer to work specifically on your request.

    Also, if you have a document showing your example or images, please send them to support@jotform.com including this thread id in the subject 1580814, let us know on this thread once you have sent it so we can check it. 

    Thanks. 

  • francinec1
    Replied on September 19, 2018 at 8:55 AM
    Ok, I keep sending you what I need, but your team either isn’t understanding it, or doesn’t want to finish it.
    I have two forms built base on your suggestions.
    Here is the requirement:
    1. User has to log activity from either a pick list or enter it on a a table. (You guys suggested the table, but the form is not working). I followed the instructions, but it’s putting in “Hours” where it doesn’t belong, or it’s allowing edits.
    The list of activities either requires a pre-determined value that should be displayed on the form and locked down and not able to change the value if it is one of those pre-determined values.
    If it is not a pre-determined value, the user must enter the value into the field to indicate hours. The entry hours work would be required if these are selected.
    Then, there are certain circumstances where we also need area worked. Some require hours to be entered with area, some just the area because it’s a pre-determined value.
    These are the activities:
    If it is highlighted in Yellow, the hours are required to be entered by the user and will be required.
    If it is highlighted in Blue, the Area/Booth needs to be entered and will be required.
    Values in white or without highlighted cell are pre-determined values, and should display on the form and be non-editable.
    So for example, If I am logging an activity for “Attended PTO Meeting” the value should be 1 hour displayed on the form and will be non-editable
    If I enter “Building Clean Up/Organization” I have to put in my hours.
    If I enter “German Fest Booth Support” I have to enter both my hours worked and the Area/Booth I worked in.
    I followed the instructions building the table version. https://www.jotform.com/build/82604330812145/settings/conditions/130
    But, when I check off “German Fest Bakery item” it populates the value in the Attended PTO meeting column.
    If I enter “Building and Clean Up and put in 4 hours, it also populates “hours” in Donated Lunch food items, which is not applicable.
    So, this table is not working the way it should.
    If you go with the table design, user should see the values in hours worked if pre-determined (as in “Attended PTO Meeting", or will be required and non editable.
    If I check “Building Clean up/Organization as I user, I should see that the “Hours Worked” is a required value for me to enter.
    I should be able to check any of the values and the correct value for hours should appear if pre-determined value activity
    I should be able to see that if I have to enter Hours or Area Booth it should be required for activities needing value determined by user, and Area Booth if the activity requires identification of the area or booth worked. (Ex draw down chair)
    The if activity is “Other” as I user I should be required to enter hours and what activity I performed and in what area. This can be a large text box as it is in the current jot form version.
    Users should be able to check multiple activities in table format.
    Drop down version:
    Next, I followed the instructions for the drop down version . Again, I followed the instructions from the support thread with the pick list and it’s not working as it should. https://www.jotform.com/build/82565572212153
    For this, if it is a pre-determined value (like Attended PTO meeting) the value should show in “Hours Worked” and be non-editable. If it’s not, as in the Building Clean Up/Organization, I should be required to enter my hours worked. The “Booth/Area Worked” text field should only appear for the activities highlighted in Blue in the excel table above. It should not appear any other time.
    It displays the Booth Area, worked, which isn’t applicable.
    And, I can edit the hours for “1 Hour” and make it 178 hours, which should not happen.
    If I select “Building Clean Up/organization it replicates the value and I can override it. This should just allow the entry of hours.
    Again, this should not display the booth worked.
    Honestly, at this point, I don’t care which version gets used at this point, but I need to have one of the versions working so I can get it up on my website. It’s ridiculous that it’s been in limbo since last week.
    Please spend some time on what you asked me to provide (requirements, which I have outlined several times and in greater details above and let me know what the resolution is.
    I do not have a developer to work on code, so I either need detailed instructions, or a working version.
    Thank you
    Francine
    ...
  • Kevin Support Team Lead
    Replied on September 19, 2018 at 11:03 AM

    Based on your details, it seems like the form provided by my colleague Roonet above works as you need: https://www.jotform.com/82594538825975 

    The only thing that I can see is some predefined values where a value should be asked and the fields with predefined values are not being disabled/locked. 

    I have taken these three examples you gave: 

    1. If I am logging an activity for “Attended PTO Meeting” the value should be 1 hour displayed on the form and will be non-editable

    2. If I enter “Building Clean Up/Organization” I have to put in my hours.

    3. If I enter “German Fest Booth Support” I have to enter both my hours worked and the Area/Booth I worked in.

    I have cloned my colleague's form and edit it on my end, here is how it works: 

    Need help with either conditions or better widget on a form Image 10

    Now, what would you need to do in order to achieve what you want: 

    1. List your options in the "Activity Logs" drop down: 

    1537368143screenshot 01 Screenshot 21

    2. Scroll down and make sure the "Use calculation values" option is turned on, then you will see a table below with the options on the left side and on the right side you will be able to enter a value, simply enter the number of predefined hours or enter a space if the option does not have predefined hours. 

    1537368356screenshot 01 Screenshot 32

    3. The next step is to show either the "Hours worked", "Booth/Area Worked" or both depending on the selected option, for this you will only need to set up show/hide conditions, as I see the "Hours worked" field will be shown always no matter the activity logged, the only difference is that sometimes the field will have a predefined value, so you may simply set a condition like the one below to show the hours worked field: 

    1537368691screenshot 01 Screenshot 43

    Now, since only certain activities will require "Booth/Area Worked", then you may set another condition and simply add as statements the options that will require this field, example: 

    1537368752screenshot 02 Screenshot 54

    Note that this is only an example, you will need to set the conditions according to your requirements. 

    Once you have this configured on your form, you will need to move on to the next step which would be to insert the predefined hours. 

    4. To insert the predefined hours into the proper field, you only need one condition like the following: 

    1537368890screenshot 01 Screenshot 65

    You will also find more information about how to copy fields values from one field to another on the following guide: https://www.jotform.com/help/286-How-to-Pass-Field-Value-to-Another-Field 

    5. The next step is to disable the fields when they have a predefined value, this can be done by setting a condition where you will use a statement all those options with a predefined value, example: 

    1537369107screenshot 01 Screenshot 76

    Note that this is just an example, you may edit the statements and add the options as your requirement. 

    Also, this guide will help you conditionally disabling fields, this way you can disable the hours worked according to the selected option (if it has a predefined value): https://www.jotform.com/help/371-How-to-Enable-Disable-Fields-Using-Conditional-Logic 

    It's good to mention that you do not need multiple conditions, you may add the options as statements on a single condition just like my example. 

    This guide will also help you with the show/hide conditions: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    You may also see my modified form here https://form.jotform.com/82613736090961, note that it's not a finished form and it works only with the examples I listed above. 

    Please give this a try and kindly read all the given resources so you can better understand how this works and implement it on your form. You may also clone my form and see what I did there, this guide will help you cloning it: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    I hope this helps. 



  • francinec1
    Replied on September 20, 2018 at 12:43 PM
    OK this is working after making the appropriate changes.
    I have one last item I need help with.
    Can I have it loop back to enter more activities? In other words, I can add text to say “Need to enter more actives? If Yes, it opens that field up again for multiple selections.
    Or, can we make it so that they can select multiples in the drop down?
    If we allow multiples, I’d need date column per activity logged.
    But, I’m find with the first approach if that’s possible.
    So if yes, they loop back to enter (or we copy to next section) or make it so that they can select multiple from drop down.
    If we have multiples, I’d need a date entry for each activity logged.
    But, if we have to make it a table for multiples, just give me direction to add the logic for hours worked as we did here.
    Thanks,
    Francine

    ...
  • francinec1
    Replied on September 20, 2018 at 12:43 PM
    I forgot to add the link to the form I Cloned: https://www.jotform.com/build/82622877412157
    ...
  • roneet
    Replied on September 20, 2018 at 2:32 PM

    Glad to hear that the provided solution by our team worked.

    We would like to keep one question per thread so I have segregated your next question to a separate thread.

    Follow this thread:

    https://www.jotform.com/answers/1586670

    Thanks.