Add WebParts on tabs/accordion

Discussions about Forms Designer for SharePoint 2010.
Katerina
Posts: 41
Joined: Sun May 11, 2014

12 May 2014

Hi Dimitry,


Is it possible to add web parts under the froms tabs and accordion? And if yes how?



Thanks

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

13 May 2014

You can add a web part under the form and then replace it with JavaScript. Get more info:
viewtopic.php?f=1&t=92

Katerina
Posts: 41
Joined: Sun May 11, 2014

16 May 2014

Hi Dimitry,


I have tried this but it doesn't add te web part under the form tab, It doesn't show anything.

Any Ideas?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

18 May 2014

Did you add the web part onto the form page? Does it appear under the form?

Katerina
Posts: 41
Joined: Sun May 11, 2014

19 May 2014

Yes I did and it appears on the bottom of the form.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

20 May 2014

Please, put HTML-control into a tab where you wish to append the web part. Put the following code into its Content property:

Code: Select all

<div id="wpPlaceHolder"></div>
Next, open JS-editor and put the following code there:

Code: Select all

$('td[id^="MSOZoneCell_WebPartWPQ"]:eq(1) > table')
  .detach()
  .appendTo('#wpPlaceHolder');
Replace the highlighted number with the order number of the web part on the form page.

Katerina
Posts: 41
Joined: Sun May 11, 2014

20 May 2014

Hi Dimitry,


What do you mean by Replace the highlighted number with the order number of the web part on the form page.

Wheere can I find that?


Thanks

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

20 May 2014

I've highlighted it in my code, here: td[id^="MSOZoneCell_WebPartWPQ"]:eq(1)

Katerina
Posts: 41
Joined: Sun May 11, 2014

20 May 2014

I mean where can I find that number? I have seen it in your code, but where can I find it to put it there?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

20 May 2014

it's just an order number of the web part on the page: 0,1,2...

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests