copy the currently selected content type

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
RMIC
Posts: 96
Joined: Sun May 10, 2015

25 Aug 2017

Hello,

How can I copy the currently selected content type to a text column in a form via Javascript. I have tested the following, but it does not work:

var contenttype_new = fd.field('ContentType').control()._el().find('selected');
var contenttype_new = fd.field('ContentType').control()._el().text();

fd.field('copy_contenttype').value(contenttype_new);

Can you help me?
Thanks!

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

25 Aug 2017

Hello!
Try this:

Code: Select all

fd.field('ContentType').control()._el().find(":selected").text();
Cheers

RMIC
Posts: 96
Joined: Sun May 10, 2015

28 Aug 2017

It works.

Many Thanks!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests