Display Form Behavior

rss

Posted by schuess - Nov 12 ’14 at 05:40

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();
};

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 22 days
    #1 by Dmitry Kozlov Nov 13 ’14 at 03:43

    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:

    fd.field('urgent').control()._el().text()
    
  • schuess
    schuess
    Member
    Member for: 5 years 10 months 18 days
    #2 by schuess Nov 13 ’14 at 10:27

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

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

  • schuess
    schuess
    Member
    Member for: 5 years 10 months 18 days
    #3 by schuess Nov 13 ’14 at 10:28

    [#2]: I figured it out with your help.

     

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

  • schuess
    schuess
    Member
    Member for: 5 years 10 months 18 days
    #4 by schuess Nov 13 ’14 at 10:28

    [#2]: I figured it out with your help.

     

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

Displaying 1 to 4 of 4 messages