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

    Is it possible to set the Checkboxes as Read-only mode and auto check or check them based on a previous selection?

    Asked by rcb2002 on May 13, 2014 at 10:08 AM

    Hello again, support.

    I'm almost done with this project and in this phase always appears some bizarre needs. My problem now is that the meals are mandatory (they are built in a day) and that's why the checkboxes come in MEALS selected by default. Thus, I must prevent the user to uncheck them suggesting that he will stay but do not want to eat. That will not be allowed. So now I'm looking for a way to count when the days are shorter (or outside) the range of meals, the box becomes disabled (or unchecked) automatically, without the user interfere. For example, to change my check-out date to the 15th will compulsorily exempt me from paying the lunch of 16th (but this is already checked by default). Remembering: fields MEALS CAN'T BE ALTERED BY THE USER. 

    Many thanks again!

    Page URL:
    http://form.jotformz.com/form/41113298100643?

    checkbox checkboxes problem check selected
  • Profile Image

    Answered by EliezerN on May 13, 2014 at 12:00 PM

    Hii,

    So, according to my understanding what you need is to:

    1. Set the checkboxes for your field Meals mandatories and prevent users from check or uncheck them.

    2. If check-out date is a day before one of the days specified for Meals, then the meal(s) of the next day will be automatically unchecked.

    Such scenarios cannot be accomplished by using the already existing features of our form builder, you will need to use your form source code and apply custom script. Here is how to get the source code of your form: How to get your form source code

    - So, for the first scenario regarding to prevent the users from unchecking or checking the checkboxes for meals, you will need to use the next script:

    <script type="text/javascript">

    function CheckboxReadOnly() {

       return false;

    }

    Remember that you need to use the source code of your form to embed it to your web page, so the script above needs to be placed between the <head> and </head> tags of your web page code.

    And then add onClick="return CheckboxReadOnly()" to each one of your checkbox options for Meals as shown in the image:

    I cloned your form and perfomed the changes of this first scenario, here it is: https://shots.jotform.com/eliezer/form-uploads/checkboxes-read%20only.html

    As you can see the Checkboxes cannot be unchecked, they are in read-only mode.

    - For the scenario number two, please confirm us if what I have described in above, is what you exactly need.

    This scenario would need a more elaboratedn script/code, I need to admit that I am not an expert with scripts, but in the meantime I will try to find a solution that may work in case my assumption regarding to the second scenario is correct and will update you via this thread.

    Thanks

  • Profile Image

    Answered by raviprashanth83 on May 13, 2014 at 08:32 PM

    I saw this reply, on just gazing through the forum. I hope, using your methodology, external data's can be feed into the fields, I reckon. 

    Am I dreaming? Could you provide your opinion on this?

  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 14, 2014 at 12:38 AM

    Hello raviprashanth83,

    I am not sure if I have understood your question correctly.

    Do you want to pre-populate your form fields with data? Yes it is possible. You can take advantage of our "Field Prepopulator" app to generate the URL which will pre-populate your form fields. 

    I would suggest you to explain your requirement a bit more in detail so that we can help you better.

    We will wait for your response.

    Thank you!

  • Profile Image

    Answered by rcb2002 on May 14, 2014 at 02:06 PM

    Thank You guys. I have one major limitation: I have used an assistant "on cloud" to create this webpage ... the Wix.com. The result is that it prevents any editing. Thus, I am forced to keep as is. Not a big problem. Still appreciate the support!

  • Profile Image
    JotForm Support

    Answered by Mike_T on May 14, 2014 at 04:48 PM

    On behalf of my colleagues you are quite welcome. Please feel free to contact us if you need any further assistance. We will be happy to help.

  • Profile Image

    Answered by raviprashanth83 on May 14, 2014 at 08:41 PM

    Thanks for the reply. Its not pre-populating data.

    I would like to have the data from a external source (eg Google Spreadsheet), to be inserted in a field.

    For example, let's say there is dropdown field. I want the values (dropdown values) to be fed from a Google Spreadsheet Column (or Range).

    If you can create a link between a field and Google Spreadsheet through Javascript.

    Do you get my idea?