Page 1 of 2
Add WebParts on tabs/accordion
Posted: 12 May 2014
by Katerina
Hi Dimitry,
Is it possible to add web parts under the froms tabs and accordion? And if yes how?
Thanks
Re: Add WebParts on tabs/accordion
Posted: 13 May 2014
by Dmitry Kozlov
You can add a web part under the form and then replace it with JavaScript. Get more info:
viewtopic.php?f=1&t=92
Re: Add WebParts on tabs/accordion
Posted: 16 May 2014
by Katerina
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?
Re: Add WebParts on tabs/accordion
Posted: 18 May 2014
by Dmitry Kozlov
Did you add the web part onto the form page? Does it appear under the form?
Re: Add WebParts on tabs/accordion
Posted: 19 May 2014
by Katerina
Yes I did and it appears on the bottom of the form.
Re: Add WebParts on tabs/accordion
Posted: 20 May 2014
by Dmitry Kozlov
Please, put HTML-control into a tab where you wish to append the web part. Put the following code into its Content property:
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.
Re: Add WebParts on tabs/accordion
Posted: 20 May 2014
by Katerina
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
Re: Add WebParts on tabs/accordion
Posted: 20 May 2014
by Dmitry Kozlov
I've highlighted it in my code, here: td[id^="MSOZoneCell_WebPartWPQ"]:eq(1)
Re: Add WebParts on tabs/accordion
Posted: 20 May 2014
by Katerina
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?
Re: Add WebParts on tabs/accordion
Posted: 20 May 2014
by Dmitry Kozlov
it's just an order number of the web part on the page: 0,1,2...