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

    Dual List Box Widget : Set a default for options

    Asked by nickbh on November 08, 2016 at 08:17 AM

    Hi,

     

    I am using the "Dual Listbox Widget".  The widget works fine.  However I have a few of questions?

     

    1) Can you default the list to have some suggestions pre-selected?

    2) Is it possible to assign pre-selected "picks" through updating the source code

     

    If it is not possible - can you suggest an alternative widget or field type that would allow the editing of the source code to pre-populate the "picks".

     

    Any info greatly appreciated

     

    dual list dual source selected field type OR
  • Profile Image
    JotForm Support

    Answered by John_Benson on November 08, 2016 at 10:55 AM

    1) Can you default the list to have some suggestions pre-selected?

    To my understanding, you want to have a default options pre-selected in the Dual List widget. Unfortunately, there is no option to set a default values in that widget. By default, all options will be on the first column/box.

    2) Is it possible to assign pre-selected "picks" through updating the source code

    You may download the form source code and have a developer check if that is possible. Here's a guide on How-to-get-the-Full-Source-Code-of-your-Form.

    If it is not possible - can you suggest an alternative widget or field type that would allow the editing of the source code to pre-populate the "picks".

    Sorry but there are no similar widgets related to this. However, you can use the "Update/Calculate Field Condition" in order to update a specific fields based on the selected option. The only problem is you need to manually add the fields and the the conditions.

    Here's a guide: https://www.jotform.com/help/286-How-to-Pass-Field-Value-to-Another-Field

    Let us know if you have any questions. Thank you.

  • Profile Image

    Answered by nickbh on November 14, 2016 at 09:33 PM

    Hi John,

     

    I'm still investigating this.  I have reviewed the source code and can see the correct section - but not sure if its possible to set any options - ie of what by default should be selected.

     

    So I started to look at workarounds.  But again unless I am mistaken there is no way to update a dual list box with selections by passing a value from another field?  If it is possible can you send me a demo form?

     

    Thanks

    PS I found the codeby using the developer tools online in Google chrome - but don't have a clue where to find the code (ie which file)?  If I knew I think could easily achieve what I need.

    <select multiple="multiple" id="bootstrap-duallistbox-selected-list_duallistbox[]" class="form-control" name="duallistbox[]_helper2" style="height: 220px;"><option value="Arinsal">Arinsal</option><option value="Canillo">Canillo</option><option value="La Massana">La Massana</option></select>

     

  • Profile Image
    JotForm Support

    Answered by Kevin_G on November 14, 2016 at 11:08 PM

    Unfortunately the condition to copy the value from a field to another will only work if you copy the field from the widget to a different field, but if you want to copy the value from a field to the widget then it will not work, this is because the way how  widgets are developed and this is also why you cannot find the widget in the source code, because widgets are loaded in a different way compared to normal fields such as text boxes, email field or address fields. 

    So will not be possible at the moment to pre-define some options in the widget even getting the source code.

    What we can do is to request this feature to our developers if you want, we will forward then this thread to our second level, but we cannot ensure an ETA or if this will be available; however, will would let you know as soon as we get news regarding this. 

    Please do let us know if you would like this to be escalated so we can proceed. 

     

  • Profile Image

    Answered by nickbh on November 15, 2016 at 05:01 AM

    Yes please.  If you could escalate it to the development team that would be great.  It is a very useful widget that allows handling of multiple (and large quantities) of data simply.  However without the control to pre-populate or update it makes working with it cumbersome to the user.

     

    E.g if you have a list of carefully selected options of say 60 out of a 100, and then you use a form to update the data, obviously the end users has to remember to again include the 60 previously selected options even if they only wish to add a further 1?

     

    Many Thanks

     

  • Profile Image
    JotForm Support

    Answered by Helen on November 15, 2016 at 06:00 AM

    Thanks for contacting us.

    I have escalated this thread to our second level as a feature request so this could be evaluated by our developers. 

    Please do note that we cannot provide an ETA about when this could be available or if this will be implemented, but we will ensure to let you know as soon as we receive news regarding this request.