In my last post, I talked about how to use JQuery to insert an image into entity form, but you do need to get the static URL of the image, and you also need some JQuery skill to modify the code.
I used the combination of JQuery and Silverlight, to achieve the image upload function.
Below is the new version of the form:
As you can see, when you open an entity form, on the top right corner of the site, there is a default photo. When you click on the image, you will see a popup window asking you to choose your image.
After you chose you photo and click “Save”, the photo will be saved automatically as an attachment of the Note that is associated with the current entity. You can actually see the Image name appear on the Note section of the form.
One good thing about this approach is you don’t really need to save the current record to save the photo. After you finish the step above, if you click F5 to refresh the page, you will see the new photo will be loaded again, which means before you refresh the page, that new photo is already be saved.
Here is the final result:
That’s it for the inserting image into entity form series; hopefully I can show you something new in my next post.