Inline select list or radio button

Inline select list or radio button

koniahinkoniahin Posts: 21Questions: 5Answers: 1

Looking through all the examples I see that you can set up select lists, radio buttons, and similar that can be accessed when you click on the "Edit" button and open the update options in a pop-up box. However in none of the examples do I see an option to display a select list inline, say a list of countries, in a cell. The advantage here is that it's less clicks for the administrator. Rather than having to:

Select a row
Click the "Edit" button
Select the country from the list in the popup
Click "Update"

You simply select the country.

Is this doable, how?

Answers

  • allanallan Posts: 47,045Questions: 1Answers: 6,628 Site admin

    The last column in this example makes use of select inline.

    In theory any input type that can be used in the main form can also be used inline. I say "in theory" as not all input types are suitable for inline editing - e.g. a wysiwyg editor wouldn't be a particular great interface for inline editing, even although it would work!

    Allan

  • koniahinkoniahin Posts: 21Questions: 5Answers: 1
    edited July 6

    Quite surprisingly I got an inline select list from a query working.

    { data: "articles.alias", editField: "menu_items.url_id" }
    

    In the php file I added the Field with a leftJoin as in the example. Now for the simple.
    I've been looking around for a simple toggle example something like Publish with 2 options, Yes/No.

    What is the syntax for setting up a simple toggle of several static items like yes/no or 1-4? It will match the same Publish (or other) options I set up in the Editor.

  • allanallan Posts: 47,045Questions: 1Answers: 6,628 Site admin

    Sounds like radio is what you want there - or perhaps checkbox?

    Allan

  • koniahinkoniahin Posts: 21Questions: 5Answers: 1

    Yes checkbox but I need to see an example of the syntax.

  • koniahinkoniahin Posts: 21Questions: 5Answers: 1

    Checkbox - sorry probably not checkbox. It would be the syntax for a simple dropdown select with 2 options, Yes and No.

  • allanallan Posts: 47,045Questions: 1Answers: 6,628 Site admin

    For a dropdown with yes / no options, have a look at this example (Done/Todo in the example, but the principle applies).

    Allan

  • koniahinkoniahin Posts: 21Questions: 5Answers: 1

    Perhaps you misunderstand. The example that you referenced only helps in display, it does not give the ability to make a choice, inline.

  • kthorngrenkthorngren Posts: 2,970Questions: 19Answers: 668
    edited July 11

    I've used radio buttons inline:

    I suspect the examples that Allan has shown will work inline as well. Are you having problems getting radio buttons or whatever type of list you want working with inline editing?

    Kevin

  • koniahinkoniahin Posts: 21Questions: 5Answers: 1

    Yes I'm not javascrpt-skilled, need to see a sample of the code to make it happen.

    Here's what I have that works in the popup editor:

      }, {
        label: 'Publish:',
        name: 'menu_items2.publish',
        type: "select",
        options: [
          { label: "Yes", value: "yes" },
          { label: "No", value: "No" }
        ]
      }, {
    
  • kthorngrenkthorngren Posts: 2,970Questions: 19Answers: 668
    edited July 12

    Does it not work with inline editing?

    If not what happens?

    Do you get any errors?

    Kevin

  • allanallan Posts: 47,045Questions: 1Answers: 6,628 Site admin

    That should work just fine with inline editing. All of the built in field controls will work for main, bubble and inline editing. Just trigger inline editing on your cells in that column like you do for any other inline edit.

    Allan

Sign In or Register to comment.