Create a dropzone input
dropZoneInput( inputId, choices, presets = NULL, hidden = FALSE, placeholder = NULL, highlight = FALSE, multivalued = FALSE, selectable = FALSE, selectOnDrop = FALSE, togglevis = FALSE, togglelock = FALSE, removeOnSpill = TRUE, direction = "vertical", maxInput = Inf, replaceOnDrop = FALSE, flex = FALSE, server = NULL, ... )
inputId | The |
---|---|
choices | List of acceptable values with their associated labels. Note that
the labels can be arbitrary HTML, as long as they are wrapped in a |
presets | Array or list of preset values. |
hidden | Should the selected items be hidden? This is useful to represent a reactive or event trigger. |
placeholder | Insert placeholder text. |
highlight | Highlights the container on dragover. Useful when |
multivalued | Allow multiple items with the same value? |
selectable | Are the items in this dropzone selectable? Default is |
selectOnDrop | Should new dropped items be automatically selected? |
togglevis | Add an icon to allow toggling items between visible/invisible. Default is
|
togglelock | Add an icon to allow toggling items between locked/unlocked. Locked items
are not draggable. Default is |
removeOnSpill | Remove items when dragged outside dropzone? Default is |
direction | Direction ( |
maxInput | Maximum allowable dropped items. |
replaceOnDrop | Replace item on drop when at maximum allowable items? |
flex | Use flex container for dropzone. Items are set to wrap, and flex direction is
given by the |
server | Function or function name as a string that will be used for
server-side creation of UI for dropzone items. This is needed only when the
dropzone items contain Shiny inputs and/or outputs. You must also include
the |
... | Additional arguments passed along to |
#> <div id="dropzone" class="form-control ds-dropzone" data-select-on-drop="false" data-remove-on-spill="true" data-direction="vertical" data-max-input="Infinity" data-server="false"> #> <span class="ds-placeholder hidden"></span> #> <div class="ds-dropzone-options"> #> <div data-value="one" data-instance class="ds-dropoption">1</div> #> <div data-value="two" data-instance class="ds-dropoption">2</div> #> <div data-value="three" data-instance class="ds-dropoption">3</div> #> <div data-value="four" data-instance class="ds-dropoption">4</div> #> </div> #> </div>