Inline select list or radio button
Inline select list or radio button
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
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
Quite surprisingly I got an inline select list from a query working.
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.
Sounds like
radio
is what you want there - or perhapscheckbox
?Allan
Yes checkbox but I need to see an example of the syntax.
Checkbox - sorry probably not checkbox. It would be the syntax for a simple dropdown select with 2 options, Yes and No.
For a dropdown with yes / no options, have a look at this example (Done/Todo in the example, but the principle applies).
Allan
Perhaps you misunderstand. The example that you referenced only helps in display, it does not give the ability to make a choice, inline.
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
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:
Does it not work with inline editing?
If not what happens?
Do you get any errors?
Kevin
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