Each component should have one image and a few questions to it. How can I add that image? Anybody know?

Comments

hollybeary’s picture

css background images maybe?

Hellboy80-1’s picture

You misunderstand me, I ment different images for different components. For example - I could have one component with a question "what person is on this picture?", then picture bellow it and a few options for the answer.

suryanto’s picture

you can use markup to insert the image.

Regards,
Suryanto

Hellboy80-1’s picture

I tried this with tag "img src" and its not working. What tag or command should I use to display particular pictures in Webform components?

fpcreator2000’s picture

I used the markup with Only local images are allowed. and it worked. Just make sure the input type you have it set to allows the img tag, which should.

HagleyPark’s picture

For anyone like me who didn't immediately find the solution and is using Drupal 6.x, and found this thread:

When creating a form with webform, you add form components, and at that time you can select the 'type' of component.
The type "markup" describes itself as "Markup allows you to enter custom HTML or PHP logic into your form."

So, to add a picture above or below a form item, just add a markup and put the appropriate HTML in it.
eg < img src="http://localhost/mypicture.jpg" >< /img >

And make sure you select "input format" as Full HTML.

The description field in the 'configuration' tab also accepts HTML, but apparently not the others.

rfiertek’s picture

Is there an equivalent markup type field for CCK built forms? I am trying to insert images into the node/edit template.

Thanks,
Rob

pebels’s picture

Hi, I have used markup and it´s really great about including images in webform, but if this method has to be used by users I think it´s difficult because users mustn´t know about html tags like Only local images are allowed.
There is another way to add an image associated with each form field... i am trying to say that if someone has development an alternative field in "properties, display or validation" tabs when a field form is being eddited with form builder and webform.
Thank you very much!
I am a newbie but I am ready to learn!

rajmataj’s picture

For Drupal 7, this is a new module but worth a look: https://www.drupal.org/project/webform_select_image