0

The first part is working not the second.

Intent: To have users select add attachment button on a custom list new form. Then select browse button that allows to browse out to select image on computer. Once save the image appears in the custom list.

Problem: The browse button allows the user to browse out to add the photo, but the photo doesn't appear in the column just the destination URL.

Steps to resolve:

  1. Placed the browse button code to the new form

  2. Created a image column type

Is there way by either using a calculated field or scripting that will convert the destination url into a image into another column? Thanks for your help.

    <style type="text/css"> 
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<h3 class="ms-standardheader">
<nobr>Attach Files</nobr>
</h3>
</td>
<td valign="top" class="ms-formbody" id="attachmentsOnClient" style="width: 434px">
<span dir=”ltr”>
<input type=”file” name=”fileupload0″ id=”onetidIOFile” size=”56″ title=”Name”>              </input>
</span>
</td>
<td width="100px" valign="top" class="ms-formbody">
<input name="Button1" type=”button” value="Attach" onclick='OkAttach()'       style="width: 6em;
 height: 1.7em" />
<span id="idSpace"></span>
</td>
</tr>
</style> 
  • if this is your HTML.. you can not define HTML inside a style tag. Calculated Column with HTML won't help because they only work on Views, not on Forms – Danny '365CSI' Engelman Mar 31 '16 at 14:24
  • Good points. Thank you @DannyEngelman I will take another look. – SharePoint Lady Mar 31 '16 at 14:30
  • Sadly, I can't elaborate more at the moment, but I think that you may find what you need if you look into client side rendering/ jslink. If all you need is to render the column value as an img tag, it should be doable. – Hitodama Mar 31 '16 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.