Module Expr Str ImportFrom alias Assign NameStore ListLoad Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str ListLoad NameLoad NameLoad Str NameLoad Str Dict Str body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
********************************************************************************
* Name: select_input.py
* Author: Nathan Swain and Ezra Rice
* Created On: May 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
 base TethysGizmoOptions N/A __all__ N/A SelectInput SelectInput N/A TethysGizmoOptions N/A N/A 
    Select inputs are used to select values from an given set of values. Use this gizmo to create select inputs and multi select inputs. This uses the Select2 functionality.

    Attributes:
        display_text(str): Display text for the label that accompanies select input
        name(str, required): Name of the input element that will be used for form submission
        multiple(bool): If True, select input will be a multi-select
        original(bool): If True, `Select2 reference <http://ivaynberg.github.io/select2/>`_ functionality will be turned off
        options(list): List of tuples that represent the options and values of the select input
        initial(list): List of values that represent the initial selected values
        disabled(bool): Disabled state of the select input
        error(str): Error message for form validation
        attributes(dict): A dictionary representing additional HTML attributes to add to the primary element (e.g. {"onclick": "run_me();"}).
        classes(str): Additional classes to add to the primary HTML element (e.g. "example-class another-class").

    Example

    ::

        # CONTROLLER
        from tethys_sdk.gizmos import SelectInput

        select_input2 = SelectInput(display_text='Select2',
                                    name='select1',
                                    multiple=False,
                                    options=[('One', '1'), ('Two', '2'), ('Three', '3')],
                                    initial=['Three'],
                                    original=['Two'])

        select_input2_multiple = SelectInput(display_text='Select2 Multiple',
                                             name='select2',
                                             multiple=True,
                                             options=[('One', '1'), ('Two', '2'), ('Three', '3')],
                                             initial=['Two', 'Three'])

        select_input_multiple = SelectInput(display_text='Select Multiple',
                                            name='select2.1',
                                            multiple=True,
                                            original=True,
                                            options=[('One', '1'), ('Two', '2'), ('Three', '3')])

        select_input2_error = SelectInput(display_text='Select2 Disabled',
                                          name='select3',
                                          multiple=False,
                                          options=[('One', '1'), ('Two', '2'), ('Three', '3')],
                                          disabled=True,
                                          error='Here is my error text')

        # TEMPLATE

        {% gizmo select_input select_input2 %}
        {% gizmo select_input select_input2_multiple %}
        {% gizmo select_input select_input_multiple %}
        {% gizmo select_input select_input2_error %}

     __init__ N/A N/A self name display_text initial multiple original options disabled error attributes classes N/A N/A False False False N/A N/A N/A 
        Constructor
         N/A N/A N/A N/A super SelectInput self __init__ attributes attributes classes classes N/A N/A self display_text display_text N/A N/A self name name N/A N/A self initial initial N/A N/A self multiple multiple N/A N/A self original original N/A N/A self options options N/A N/A self disabled disabled N/A N/A self error error N/A N/A