I frequently have a file field in a dataform to upload an image. This is then either displayed using basic syntax like %%form_raw{image}%% or, more often, via the image box snippet so I can have a caption, for example:
[[include :snippets:image
|image=%%form_raw{musicartsimage}%%
|width=225px
|float=left
|heading=
|caption=%%form_data{musicartscaption}%%
|link=formusicarts:here
]]
This all works very well. However, if a user does not upload an image I want a default image to display. This will get over the "image not available" message and (in IE8 only) the horrid box with red cross when there is no image. Up to now I have just uploaded a blank image in the dataform but that is not a long-term solution as others will working on the site.
I just don't seem to have brain in gear this week because I can't work out how to do this. Does anyone have a solution for having a default image which displays until a user uploads an image in the dataform to replace it?
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Strathview ~ Wikidot-based wikis, websites & intranets and online database development. For community groups, villages, charities, business and government.





