Change Content Type

Discussions about Forms Designer for SharePoint 2010.
jackhill
Posts: 1
Joined: Fri Feb 22, 2013

22 Feb 2013

Is there a way to allow for people to change the content type field? On a native SharePoint edit form, a control is rendered to allow a user to swap from one content type to the next. Is there any way to expose this functionality in SPForms?

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

23 Feb 2013

Hello, Jack,

Currently Forms Designer doesn't support content type changing directly from the edit form. As a workaround, you can create dropdown field with your content types, place it into your form and change content type value based on this field in a simple workflow.

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

03 Apr 2013

Hello, Jack,

We have added required functionality in th last version: 2.6.4840. Download it from our website. Now, you can add Content Type field like any other field and change it in a new or edit form.

User avatar
Jeff Childers
Posts: 18
Joined: Sun May 25, 2014

12 Feb 2014

Can seem to find this option. Where would I find the field for "content type"

User avatar
Jeff Childers
Posts: 18
Joined: Sun May 25, 2014

12 Feb 2014

Let me clarify that I am looking for content type in the edit form of a list, not a document library.

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

13 Feb 2014

Hi Jeff,

Unfortunately, Content Type field is supported by Forms Designer for SharePoint On-premises only.

craigwat11
Posts: 11
Joined: Thu Apr 24, 2014

02 May 2014

Hi, is it possible to set the content type depending on another field?

I've basically set up a button that when clicked I want it to change the content type - code i'm using is below but it doesn;t work.

fd.field('ContentType').value('value');

ta

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

06 May 2014

Please, try the following code:

Code: Select all

// getting the SELECT element
var contentType = fd.field('ContentType').control()._el().find('select');

// setting the second type
contentType.find('option').eq(1).prop('selected', true); 

// reloading the form
contentType.change(); 

craigwat11
Posts: 11
Joined: Thu Apr 24, 2014

07 May 2014

Perfect, thank you for all your help.

ds4be
Posts: 20
Joined: Fri Nov 07, 2014

08 Nov 2014

Hi I am very new to this, can you explain what the 'select', 'option' and 'selected' is referring to? are they CSS Code, internal references, fields or content types?


// getting the SELECT element
var contentType = fd.field('ContentType').control()._el().find('select');

// setting the second type
contentType.find('option').eq(1).prop('selected', true);

// reloading the form
contentType.change();

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests