What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image
    JotForm Support

    Should the numeric fields be set as in the original form?

    Asked by abajan on January 14, 2013 at 06:43 AM

    This thread was created to deal with a query not quite related to what was being discussed in the original thread in which it appeared: Calculation bug in iPad 2.

     

    Hi Joshua,

    In the CESD-R section (page 4) of my second demo in the Create a Grand Total thread, the drop-downs contain text and the total is determined by the selection made in each drop-down, as follows:

    Not at all or less than 1 day counts as 0
    1 to 2 days counts as 1
    3 to 4 days counts as 2
    5 to 7 days counts as 3
    Nearly every day for 2 weeks counts as 4

    So, let's say that instead of twenty questions, the CESD-R section contained just the first five and the above choices were made, the total would be 10 (0 + 1 + 2 + 3 + 4) and the instead of the notification containing just the digits 0 to 4 for the answers to those questions, it would look like this:


    However, if you wish, the answers could easily be edited to include the numbers, as follows:



    (Of course, in either case, the hover texts would no longer be necessary.) Would either of the above be suitable? If so, which one?

    I look forward to your reply.


    Wayne

  • Profile Image

    Answered by calema on January 14, 2013 at 12:34 PM

    Hey Wayne,

    The second example you provided would be ideal. So if it responded for example "5 to 7 days (3)" that would be great.

    Best--

    Josh

  • Profile Image

    Answered by calema on January 14, 2013 at 12:38 PM

    BTW I need this on the CAPS. For now, I do not need this on the CES-D or the M-FAST.

    Josh

  • Profile Image
    JotForm Support

    Answered by abajan on January 14, 2013 at 01:35 PM

    Okay, the script will definitely have to be edited. I'll have a look at it later and get back to you as soon as I come up with a solution.


    Wayne

  • Profile Image
    JotForm Support

    Answered by abajan on January 14, 2013 at 09:59 PM

    Josh,

    Many of the hover text boxes contain too much information to properly fit into the drop-down menus. For instance, the last choice in the D4b question would be "Extreme, excessive hypervigilance, efforts to ensure safety consume significant time and energy and may involve extensive safety/checking behaviors, marked watchfulness during inteview (4)" which would require a ridiculously wide drop-down menu!

    Not to worry, I'm working on a solution where the fields in question can be left as is (with just the digits in the drop-downs and the accompanying hover texts). I'll keep you updated.


    Wayne

  • Profile Image

    Answered by calema on January 14, 2013 at 10:35 PM
    Thanks so much. Let me know how I can help.
    That text length was why I made them hovers in the first place. :-)
    Sent from my iPhone
    On Jan 14, 2013, at 6:59 PM, JotForm Support Forum
    wrote:
    New response received
    A new response has been received:
    [image: JotForm]
    Answered by * abajan *
    Josh,
    Many of the hover text boxes contain too much information to properly fit
    into the drop-down menus. For instance, the last choice in the
    *D4b*question would be "Extreme, excessive hypervigilance, efforts to
    ensure
    safety consume significant time and energy and may involve extensive
    safety/checking behaviors, marked watchfulness during inteview (4)" which
    would require a ridiculously wide drop-down menu!
    Not to worry, I'm working on a solution where the fields in question can be
    left as is (with just the digits in the drop-downs and the accompanying
    hover texts). I'll keep you updated.
    Wayne
    View this thread on JotForm Support
    Forum
    Unsubscribe
  • Profile Image

    Answered by calema on January 15, 2013 at 09:40 PM

    Whaddya think, my friend?

  • Profile Image
    JotForm Support

    Answered by abajan on January 15, 2013 at 10:21 PM

    Hi Josh,

    The solution I had in mind works. I should have the revised script ready for you sometime tomorrow morning.


    Wayne

  • Profile Image

    Answered by calema on January 15, 2013 at 11:42 PM
    I want to get you a promotion.
    Sent from my iPhone
    On Jan 15, 2013, at 7:21 PM, JotForm Support Forum
    wrote:
    New response received
    A new response has been received:
    [image: JotForm]
    Answered by * abajan *
    Hi Josh,
    The solution I had in mind works. I should have the revised script ready
    for you sometime tomorrow morning.
    Wayne
    View this thread on JotForm Support
    Forum
    Unsubscribe
  • Profile Image
    JotForm Support

    Answered by abajan on January 16, 2013 at 12:35 PM

    Hi Josh,

    Please complete and submit this demo as many times as you wish, and have a look at the "thank you" page after each submission. The table on the thank you page is the same one that should appear in your notification. However, when performing my own checks, I discovered that the PTSD Severity (grand total: B + C + D) answer was not showing up in the notifications. That's because the tag is incorrect. It should be {ptsdSeverity}, as shown below:

     

    That would have happened because that field was updated after the notification had been edited. However, once the tag is changed the total will be displayed.

    Once you replace my old script that's currently at the bottom of your web page with this updated one, the numbers and their respective texts should appear in your notification.

    Do let us know how everything works out. (Whenever you would like the answers for the CESD-R and M-FAST fields to be similarly displayed, let me know.)

    Btw, thanks for your recommendation for a promotion :)


    Wayne

  • Profile Image

    Answered by calema on January 16, 2013 at 01:23 PM

    Wayne-- I believe you've done it again. The demo seemed great, so I went ahead and copied the script over. Early testing looks excellent. We'll be using it throughout the day so I'll let you know if any bugs pop up.

    I don't think I'll need the CESD-R or M-FAST set up with the same functions, but the last bit I'll need is that I'll be duplicating this entire form and then adding a few sections. This is for a different set of evaluations we do that run parallel to the evaluation you have just helped set up. 

    When I go to duplicate and add new sections should I just do all that, or is there a way for me to manage it that makes scripting easier on your end?

    Thanks a million!

    Josh

  • Profile Image
    JotForm Support

    Answered by abajan on January 16, 2013 at 10:13 PM

    Hi Josh,

    Glad to hear the script is working on your end. As to additional fields, please make sure to insert them after the M-FAST total. Otherwise the indexing for the drop-downs and textboxes will be messed up.

    I was to explain what selects and inputs are. If you examine the source code of your form, you'll notice that all of the drop-downs are wrapped in select tags. Similarly, all of the text boxes use the input tag. However, textboxes are not the only type of field which uses the input tag. Check boxes, radio buttons and file upload fields come readily to mind but there are others. Incidentally, text areas (the large multiline textboxes) use the textarea tag and not input. So, you can safely insert more of those anywhere in the form without breaking the script's functionality. Additional free text fields would also have no effect:

     

    Perhaps the best way to find out if a field uses the input tag or not would be to make a form and insert one of each type of field and then view the form's source to see which field uses input.

    If you would like additional clarification, please let us know.

    Cheers

  • Profile Image

    Answered by calema on January 17, 2013 at 03:14 AM

    Hey Wayne,

    Thanks a lot. To boil this down, are you saying that I can insert or edit any input field, but changing or adding any select field will break the script? If that is correct, then I can further boil that down and say that I can edit any field except drop-downs? i don't think that's quite right, but I want to make myself as clear on this as possible.

    I'm also a bit confused because you said to enter any additional fields after the M-FAST total, but if I'm undertanding right I can insert input fields anywhere without harm?

    Sorry for my confusion! The simpler we can get the rules the less chance I mess anything up!

    Best,

    Josh

     

     

  • Profile Image
    JotForm Support

    Answered by abajan on January 17, 2013 at 07:24 AM

    Hi Josh,

    Actually, neither selects (drop-downs) nor any field which uses the input tag (text boxes, check boxes, radio buttons and file uploads, to name but a few) may be inserted before the M-FAST total. What it boils down to is that most types of fields may not be inserted before the M-FAST total.

    Exceptions to the above are the following elements which may be freely inserted anywhere in the form:

    Text areas (the multi-lined text boxes like the "Past or Present Medical Care" one on page 1)

    * Headings (e.g. "BACKGROUNDS & CONSENTS" on page 1, "PTSD EVALUATION", "CAPS" etcetera)

    Free text (HTML) elements (e.g. "THERAPIST: "I'm going to be asking you about some difficult or stressful things ..." on page 2)

    * Images

    There are probably elements I forgot to include in that list. The safest procedure would be to create a separate form strictly to check which types of fields can be safely inserted before the M-FAST total. In that new form, insert one of each type of field you intend to add to the PTSD forms. After the fields have been added to the "checking" form (for want of a better term), save it, get a copy of its source from the Embed Form Wizard and paste it into a text editor like Notepad or Notepad++ and save the file as an HTML document. Open that document in your browser, right click each field in turn and (in Chrome) click "Inspect element":


    A panel will open at the bottom of the page with the code for the element you clicked highlighted. If it starts with <input ..., that type of field may not be inserted above the M-FAST total.

    As far as messing anything up is concerned, the best safeguard against that would be to clone the form and make changes to the clone only. If anything goes wrong, you could always go back to the original. (At any rate, I have a copy of the original.)

    That's about it. If you would like clarification on anything, we'd be happy to help.

    Regards,


    Wayne

  • Profile Image
    JotForm Support

    Answered by abajan on January 17, 2013 at 07:32 AM

    Josh,

    Please make sure to view my last entry at the thread (http://www.jotform.com/answers/165549-Should-the-numeric-fields-be-set-as-in-the-original-form) instead of in via your inbox. Some of the formatting was affected on my first attempt at posting and I had to edit it.

    Cheers

  • Profile Image

    Answered by calema on January 17, 2013 at 01:49 PM

    Perfect. Got it. I understand what you're saying about the field check--but mostly I'll just not insert anything before M-FAST at all.

    Best--

    Josh

  • Profile Image

    Answered by calema on January 19, 2013 at 06:24 PM
    Hey Wayne,I'm getting multiple reports of the form malfunctioning from different users using different iPads and even different versions of iPads.The problem has to do with the scoring of criteria b it seems on the second page. I believe some fields are filling with Yes/No instead of numbers and then the form is not permitting the user to continue to the next page.From what I can tell this problem is not occurring on desktop computers.Thanks for your help!!! Josh
  • Profile Image
    JotForm Support

    Answered by abajan on January 19, 2013 at 06:55 PM

    Please see my reply in the Calculation bug in iPad 2 thread.