checkbox with input on same line

Hi
I’m trying to create a check box with text input like so:

{type: "checkbox", name:"name", label: "label", list: [ {type: "input", name:"name_detail", value: ""} ]},

The problem is I want the input to be on the same line as the check box, not on a new line as it is by default. How can I achieve this?

Thank You

Hi
There is newcolumn item type:
docs.dhtmlx.com/doku.php?id=dhtm … ewcolumn&s[]=newcolumn
dhtmlx.com/docs/products/dht … olumn.html

Thanks, but that doesn’t solve it. The input is in the check box list of items so the new column does nothing.

Just to clarify, I want the nested input to be on the same line as the check box. The new column won’t work as the nested elements are added in new lines by default

May be you can provide us an image with expecting result?

Or you need something like combo with checkbox?
dhtmlx.com/docs/products/dht … tions.html

This code:

{type: "checkbox", name:"name", label: "Label", list: [ {type: "input", name:"name_detail", value: ""} ]},

produces this:

I want the same behavior but with this look:

Try the next code:

{type: "block", list: [ {type: "checkbox", name:"name", label: "Label"}, {type: "newcolumn", offset: 20}, {type: "input", name:"name_detail", value: "", labelwidth: 0} ]}
The result is:

That’s exactly how I want it to look, but I want the checkbox to enable/disable the input like it did in my original code when the input was in the list array. I know I can do it your way and code the behavior but I have about 30 of these and it would be much simpler to use the included functionality. I’m starting to think that’s probably not possible

Finally solved it using custom css class for the input. Thanks for your help

Hello,
Could you give the code to enable/disable the input from the checkbox ?
Why there have an offset between checkbox and the left boder page ? Can you sove it ?

Just define elements as child items of checkbox

snippet.dhtmlx.com/b100fda8e

If you need to have checkbox and input on the same line it can be created like next

snippet.dhtmlx.com/4037b7813