Conditionally disable button

rss

Posted by Katy - Dec 16 ’16 at 10:56

 

I am trying to make a button disable when the status field is Completed, I found this tread :

http://forum.spform.com/forms-designer-for-sharepoint-20/button-disable-and-enable-27284/

and here is my code:

 

function ButtonDisable() {
if (fd.field('Satus').value() == 'Completed') {

$('.approve-button').prop('disabled', true);
} else {

$('.approve-button').prop('disabled', false);
}
}
fd.field('Satus').change(ButtonDisable);
ButtonDisable();

but it is not working L

 

 

 

  • YuriyMedvedev
    Moderator
    Member for: 6 years 2 months 14 days
    #1 by YuriyMedvedev Dec 19 ’16 at 08:24

    Hi, use this code

    function ButtonDisable() {

    $('.approve-button').prop('disabled',

    (fd.field('Title').value() != 'Completed'));

    }

    fd.field('Title').change(ButtonDisable);

    ButtonDisable();

  • Katy
    Member
    Member for: 8 years 4 months 23 days
    #2 by Katy Dec 19 ’16 at 09:25

    [#1]: Thanks Yuriy! It works. Just changed != to ==, as it was disabling the buttons when the status is not completed :-)

  • EthanEtheridge
    Member
    Member for: 1 year 3 months 2 days
    #3 by EthanEtheridge Sep 7 ’21 at 03:29

    When using the window, your plug is very useful. In addition to this post, you would have never reached this site without it. This is a great post and a great creation and students can check lawteacher review to get the best paper services. It's a pleasure to see your work. Your efforts are appreciated.

  • kayleebrown402
    Member
    Member for: 1 year 3 months 1 day
    #4 by kayleebrown402 Sep 8 ’21 at 08:39

    Computer programming and programming languages are tough to decode sometimes. If you are not a pro, it will be tough for you to handle computer programming and all the assignments related to it. If you are a beginner and you are just learning the basics, you might require an expert’s help to finish your assignment on time. Make sure you take programming assignment help from a coding expert. If you search online, you can locate someone in your locality. An experienced coder can finish the assignment on time and with clarity. You have to submit the assignment on time as the marks are associated with it.

  • alvina adolf
    Member
    Member for: 1 year 6 months 5 days
    #5 by alvina adolf Sep 16 ’21 at 07:25

    Students who are searching for a writing service you must take help from Assignment Bank. It is one of the best platforms for students to take online writing assistance. With the assistance of qualified writers, the assignment writing process becomes very easy for the students and they can easily finish the assignments without any worry. One should invest in the online writing service given by this platform and you will have access to many modern features which you won't get anywhere else. We have secure payment options on our website and you will get plagiarism-free assignments. We have been working for years for the benefit of students and we will continue to offer to research paper help UK service and TEFL Assignment help online to the students. Take our writing help for finishing your assignments without any delay.

  • Grey
    Member
    Member for: 11 months 11 days
    #6 by Grey Feb 4 ’22 at 09:31

    I always like to work with professionals who are ready to help in difficult times. Therefore, when I needed help in writing an essay, I did not choose a random service, but turned to the professional resource BrillAssignment where experts were qualified and share their knowledge and professional experience. My essay was backed up by academic research, so I didn't have any problems, and the teacher praised me for my excellent work. I plan to work with this resource in the future.

  • henry6
    Member
    Member for: 8 months 21 days
    #7 by henry6 Mar 19 ’22 at 05:47

    If you think it is very difficult to decide to best assignment service. So you can visit Hire Researcher site. Here at expert writing help service this site you can find the order essay service at reasonable cost.

  • henry6
    Member
    Member for: 8 months 21 days
    #8 by henry6 Mar 19 ’22 at 05:49

    If you think it is very difficult to decide to best assignment service. So you can visit Hire Researcher site. Here at expert writing help service this site you can find the order essay service at reasonable cost.

  • mark_anderson
    Member
    Member for: 3 months 15 days
    #9 by mark_anderson Aug 29 ’22 at 05:53

    Tw kings Cars offers a comprehensive portfolio of Private Hire passenger car services on a 24/7 basis, designed to meet the needs of our strong customer base. The diversity and flexibility of the services, together with our customer service means that tw kings Cars is the ideal choice for anyone looking for professional passenger car service. We can tailor services to meet any specific requirement.

    Pembury Taxi Service

    Tonbridge Taxi Service

     

    Wadhurst Taxi Service

  • churchillcars
    Member
    Member for: 3 months 10 days
    #10 by churchillcars Aug 30 ’22 at 06:26

     

    We care for our customers very much, therefore, work on every aspect of taxi service to make your journey as pleasant as possible, we have a commitment to looking after our clients who have been instrumental in making us London renowned in the chauffeuring industry today.

    Just Airports

    Churchill Cars

     

Displaying 1 to 10 of 12 messages
Previous12