mdelrosso / sheepit

SheepIt! Form Cloning plugin for Jquery
http://www.mdelrosso.com/sheepit/
MIT License
68 stars 44 forks source link

Data injection for images #17

Open der-robert opened 11 years ago

der-robert commented 11 years ago

Hi,

i have a form where i can upload images. Now i want to show the image on the edit page. Is it posible to inject data to image tags? -->

data: [ {id: 1,upload_image:"the_image.jpg"}, {id: 2,upload_image:"./images/the_image.jpg"} ]

or the id to a button tag as id or rel atribute?

lechuky commented 10 years ago

you can use callback function afteradd to find the input with the image src an then put it in the img src tag.

Nebel54 commented 10 years ago

This issue may be a bit old, but as i ran into this problem as well: The afterAdd-Callback is fired too early, you need to use afterFill instead.