Page 1 of 2
Change Content Type
Posted: 22 Feb 2013
by jackhill
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?
Re: Change Content Type
Posted: 23 Feb 2013
by Dmitry Kozlov
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.
Re: Change Content Type
Posted: 03 Apr 2013
by Dmitry Kozlov
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.
Re: Change Content Type
Posted: 12 Feb 2014
by Jeff Childers
Can seem to find this option. Where would I find the field for "content type"
Re: Change Content Type
Posted: 12 Feb 2014
by Jeff Childers
Let me clarify that I am looking for content type in the edit form of a list, not a document library.
Re: Change Content Type
Posted: 13 Feb 2014
by Dmitry Kozlov
Hi Jeff,
Unfortunately, Content Type field is supported by Forms Designer for SharePoint On-premises only.
Re: Change Content Type
Posted: 02 May 2014
by craigwat11
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
Re: Change Content Type
Posted: 06 May 2014
by Dmitry Kozlov
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();
Re: Change Content Type
Posted: 07 May 2014
by craigwat11
Perfect, thank you for all your help.
Re: Change Content Type
Posted: 08 Nov 2014
by ds4be
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();