cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get the current item's content type in forms

Jump to solution

Hello,

I have created some list based content types and added them to my list. I have a field called that should be auto-populated by the item's content type information when opened.

Is it possible in nintex forms?

Labels: (3)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Get the current item's content type in forms

Jump to solution

Hi,

Can you elaborate on which field must be filled with which value (coming from which other field).

I believe it is possible in Javascript.

Best regards,

Christophe

0 Kudos
Reply
Not applicable

Re: Get the current item's content type in forms

Jump to solution

Hello Christophe Raucq,

Thank you for the reply.

I have 4 content types which have a similar column "appendix" as single line of text. When I click on the new item and select the content type, I should get the content type info in the appendix column.

I don't know how to get that information via javascript.

0 Kudos
Reply
Workflow Hero

Re: Get the current item's content type in forms

Jump to solution

Hi,

Select your Content Type dialog box and right click Settings

Expand the Advanced section

Store Client ID in JavaScript variable : Yes

Client ID JavaScript variable name : ddlContentType

Close

Select your Appendix dialog box and right click Settings

Expand the Advanced section

Store Client ID in JavaScript variable : Yes

Client ID JavaScript variable name : txtAppendix

Close

In the Form Settings

Expand Custom Javascript section

In Custom Javascript, add this code

NWF$(document).ready(function(){

NWF$("#"+ddlContentType).change(function()

{

var selectedValue = NWF$('#' + ddlContentType + ' option:selected');

NWF$("#"+txtAppendix).val(selectedValue.text());

});

});

Hope this helps,

Regards,

Christophe

Reply