Bind image to form

I have a db table that has two image names that I need to bind to . How can i do this using the connector?

When I do this it does not evaluate thumbSmall

I am using a dhtmlxform with a connector to populate my form

Unfortunately it is not possible in current version of dhtmlxform.

Ok, thanks. I guess I’ll try to do this with a dataview

I know it’s a bit late to reply to this but I had the same problem today and solved it using dhtmlXform.

So I thought that someone else might find it helpful.

While going through dhtmlxform.js to see why it can’t populate my attribute i saw this code:

switch (elem['object'].tagName){
			case 'INPUT':
			case 'BUTTON':
				var elType = elem['object'].getAttribute('type');

				switch (elType.toLowerCase()){
					case undefined:
					case 'button':
					case 'hidden':
					case 'password':
					case 'reset':
					case 'submit':
					case 'text':
						elem['object'].value = value;
					case 'img':
					case 'image':
						elem['object'].src = value;

This means that instead of a plain tag we can simply use:

<input type="image" name="photofield" bind="serverpath_to_photo" src="whitepixel.jpg" style="width:100px;height:120px;"/>

And BAM! It works nicely and photo is displayed in my form.

Hi all,

Not bad solution, but do not forget that using of your custom code help your form to loose back compatability.
By the way new version of form will allow you to use images.

I didn’t put any custom code.

This is a copy paste of original code in dhtmlxform.js

I got it from : viewtopic.php?f=17&t=15977

This thread is very old and by now is supposed to be available images in dhtmlxForm, is there any example about this anywhere?

Use form item container and attach image there as in a simple div: … _grid.html