Display Form Behavior

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

12 Nov 2014

Is there something special in Display Forms that would prevent code like this from executing?


if (fd.field('urgent').control()._el().find('input').prop('checked')){
alert("You have marked this request Urgent.");
$("#displayAlert").show();
};

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

13 Nov 2014

Hello,

Yes, you can get only text representation of field values on display forms. So you should use the code below to retrieve the selected value:

Code: Select all

fd.field('urgent').control()._el().text()

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

13 Nov 2014

So if when using .input() i check for a .prop(),

what should i be checking for with .text() ?

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

13 Nov 2014

I figured it out with your help.

if (fd.field('urgent').control()._el().text() == "Yes"){

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests