Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Dropdown list check which are selected?


Question

Posted

How to check which list items are selected?

 

regards

4 answers to this question

Recommended Posts

  • 0
Posted

Hi @marczu_83 ,

 

There is example for dropdown list:

 

  • Thanks 1
  • 0
  • Inquirer
  • Posted

    thanks but i cant see anything about how to check which items are selected. 

    i want to multiselect values and then press button and check which are selected :)

     

    • 0
    Posted

    Hi @marczu_83 ,

     

    if it is multi select checked then value returned is table of values and can be printed if table is json.encode(d).

    In example code there is function that is called when dropdown menu is used:

    Please login or register to see this code.

     

    If multi select is checked then self.mode is containing table with selected items. To print it change code to:

    Please login or register to see this code.

    To print separately each selected item you need to iterate through table:

    Please login or register to see this code.

     

    • Like 1
    • Thanks 1
    • 0
    Posted

    I wrote an article about the dropdown and switch button: 

    Please login or register to see this link.


    Maybe it helps...

    • Thanks 1

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...