question

NeddyFlanders-8232 avatar image
0 Votes"
NeddyFlanders-8232 asked NeddyFlanders-8232 answered

SharePoint NewForm put Image to the right of fields

Hello, I am trying to put an image to the right of the Fields on the NewForm.aspx in a list. Would I be able to do this with a Content Editor web part? Does anybody have an example of how I would make this image show to the right of all the sharepoint fields I have created? Thanks.

office-sharepoint-server-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NeddyFlanders-5787 avatar image
0 Votes"
NeddyFlanders-5787 answered MichaelHan-MSFT commented

Hi Michael, I wasn't able to get that to come out to the right of the SharePoint fields. What I did do was go into the customized form in SharePoint Designer and added
<td><WebpartPages:WebPartZone runat="server" FrameType="None" ID="Right" Title="loc:Right"><ZoneTemplate></ZoneTemplate></WebpartPages:WebPartZone></td>
This put a web part to the right side, I then just added an image web part and pointed to my image. Thanks for helping me on this.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NeddyFlanders-8232,

Glad that you found the solution to this problem. Thanks for your sharing.

You could accept your answer via the "Accept Answer" button, it would be helpful to others who have similar issue in the future.

0 Votes 0 ·

Hi Michael, it says I can accept answer via a button but I don't see a button?

0 Votes 0 ·

Hi @NeddyFlanders-8232,

To accept answer, you should use the same account which you post this question.

0 Votes 0 ·
MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hi @NeddyFlanders-8232,

You could try to use the below code in Content Editor web part to put an image to the right Fields on the NewForm.aspx


 $(function(){
     $("table.ms-core-tableNoSpace>tbody>tr").append("<td><img src='http://sp16/sites/michael/PublishingImages/test.jpg' alt='not found' width=300 height=200  ></td>");
 });



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NeddyFlanders-5787 avatar image
0 Votes"
NeddyFlanders-5787 answered

It's putting the image to the right of Content Editor web part but it's still above and to the right of the SharePoint fields. Is there anyway to get it to the right of the fields? Thanks.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hi @NeddyFlanders-8232,

Maybe this would be helpful to you:


 $(function(){
     $("div#WebPartWPQ2>table>tbody>tr>td:first").attr('valign', 'top');
     $("div#WebPartWPQ2>table>tbody>tr").append("<td><img src='http://sp16/sites/michael/PublishingImages/test.jpg' alt='not found' width=300 height=200 ></td>");
 })
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NeddyFlanders-8232 avatar image
0 Votes"
NeddyFlanders-8232 answered

What I did do was go into the customized form in SharePoint Designer and added
<td><WebpartPages:WebPartZone runat="server" FrameType="None" ID="Right" Title="loc:Right"><ZoneTemplate></ZoneTemplate></WebpartPages:WebPartZone></td>
This put a web part to the right side, I then just added an image web part and pointed to my image.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.