1
0
-1

Hello,

I need a field which is able to contain multiple items and give me a suggestion from pre-entered data (similar to the Dropdown Multi Select field) but with the functionality to also allow manual entry of data (like the auto complete Field).

Given the components in the Maestro tool, the best way I can figure to do this is to use a Dropdown Multi Select, which almost does what I want it to, except for when a manually entered item is typed into the field, it clears out the text field if there is no match with pre-existing data. I want the manually entered item to be added as an item in the Multi select. 

My understanding is that I can create components in eclipse, Is there a way i can download a copy of the Dropdown Multi Select, make the change in eclipse, and re upload it as a custom component? Or, is there another way to achieve this? 


Thanks!

Will


Note - After creating this question, I noticed your tagging box at the bottom of the page, it is exactly what I would like to do in my form. Here is a screenshot of the functionality that I would like. Note the "create new" that appears when the entered value does not already exist.


    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Will,

      Here's something that goes close to what you are after.  I've shown some code that will dynamically add a new tag to both the tag output field and to the tag options list.

      These are the steps:

      1. Add a Dropdown Multi Select component to the form, using default name and options list
      2. Add a Text Field called extra

      3. Add a button 'Add', with this code in a Click rule:

        var newItem = {label: data.extra, value: data.extra};

        Form.getItemFromPath("data.dropdownMultiSelect").properties.options.push(newItem);
        data.dropdownMultiSelect.push(newItem.value);

      If you don't want to add the new tag to the data field, delete the last line. The line before it adds it dynamically to the dropdown values list.

      You should also add more code to make sure there are no duplicates in both the options list and the data field.

      You could also create a new button labelled 'Create New' that toggled the visibility of the Add button and the extra text box, then hide the Add button and extra text box when Add is clicked.

      Bill

      1. Will Pierson

        Hey Bill,

        Thanks for your response. This solution would work, but from a UX and design perspective I don't think it is what we are looking for. 

        Your solution calls for 3 elements to be added to a page to accomplish the same thing that one element should be able to do. Do you know of any way I can tweak already existing elements to achieve the solution I am looking for? I know it is possible because like I noted in my original answer the field with all the functionality is on this very site. 

        I have been researching how to create native components for Avoka in eclipse, but it would be very helpful if I didn't have to start from scratch and could instead make tweaks to the Dropdown Multi Select in eclipse.


        Thanks

        Will

      2. Unknown User (bfrost)

        Hi Will,

        Have you come across the native component development toolkit?  It's available from Creating Maestro Native Components

        I should add that developing native components doesn't support any kind of inheritence, so you'd be creating a new component, albeit you might start by cloning an existing one.

      3. Will Pierson

        How do I clone an existing component?

      CommentAdd your comment...