Just display a bunch of text in a form. Possible?

I have duckduckgo’d and googled for this a lot, so I think the answer is no.
But just in case, I thought I’d try here:

Is it possible to put some text inside a form? Have a little explanation underneath a button?
Put some poetry above a frameset?
Maybe even a picture of someone touching her nose after a label?

You can use the next features for using text in form:

  1. template dhtmlx.com/docs/products/dht … plate.html
  2. custom item dhtmlx.com/docs/products/dht … ustom.html
  3. tooltip dhtmlx.com/docs/products/dht … ltips.html
  4. help and ifo dhtmlx.com/docs/products/dht … _info.html

Awesome, note: {} is what I am looking for.
Thank you for linking to the resources!

I meant note and template. :slight_smile:
Couldn’t find the edit button.

You are welcome :slight_smile:

For notes it doesn’t really work as expected though. :nerd:

You need to apply width for this note:

note: { text: "Enter your project name...", width: 100 }

This changes the position of everything.

{type: "fieldset", name: "flags", label: "Debug Flags", width:defaultWidth, offsetLeft: 10, list:[ { type: "checkbox", name: "debug_no_limit", label: "<b>Oh yeah baby check my checkbox</b>", position:"label-right", checked: true, note : { text : 'This text is rather long, it will span multiple pixels, probably over 9000.', width: 400 } }, // etc

I’m not doing anything fancy. Just default css from the package and the skin builder. I think note is not meant to be used for this.

-addition-

I can use template with a callback function that returns a div that has some custom styling and a custom offsetLeft to emulate having a descriptive smallprint, but it’s a rather ugly solution.

I was hoping I wouldn’t be the first to struggle with this and there would be a more proper solution, like being able to simply add a text-node to a form. :slight_smile:

Can’t reproduce locally.
Could you provide the whole json and form’c container size and type?
Or the best way is providint completed demo
docs.dhtmlx.com/doku.php?id=othe … leted_demo

How can you not reproduce? I can not not reproduce. :nerd:

I attached the complete demo for you. :slight_smile:
Tested and verified in Firefox 24 and Chromium 28.
Complete Demo - forms.zip (619 KB)

Hi

accrding your demo

  1. is ok
  2. you need to specify labelWidth:400 for example
  3. note rendered under input, default note width equal to input’s width
  4. due you set note width:400 - label just “jumped” to next line dure parent width 480 (fieldset)

please provide a screenshot of awaited result?
(I guess you want to place note under checkbox’s label?)

Yes, I want

[checkbox] "My label text" Note with description here

And thanks for looking into it!

(I’m so used to editing my posts that I am too quick to press submit every time. This one doesn’t support editing, right? Or only for seasoned members?)

Hi

unfortunately form does not support requested behaviour,
you can use label as workaround, for example:

{type: "checkbox", label: "Remember me", checked: true}, {type: "label", label: "this is comment for checkbox", className: "label_note"}

and css

.dhxform_item_label_left.label_note .dhxform_txt_label2 { font-weight: normal; font-size: 11px; margin: 0px 1px 5px 1px; padding: 0px; color: #909090; }

This works, thank you.