Disable button

By: Robert Cabiya-an | Asked: 08/04/2024
ForumsCategory: How-toDisable button
Robert Cabiya-an asked 2 months ago
Hi, I have a form with approvals. how can i disable button base on the field in the form. example. In the form. I have three approvals.
  1. first Dropddown = Approved
  2. second Dropdown = Approved
  3. third Dropdown = Approved
if all is approved, i want the submit button to be disabled even if someone change the values or otherwise, disabled all the fields of the form afther the submission of the third dropdown.   Thank    
1 Answers
Victor Font answered 2 months ago
You'll need to use jQuery, but what's the purpose of disabling form submit after the fields are approved? Nothing will be saved, not even the approved status of the dropdowns.
Robert Cabiya-an replied 2 months ago

Yes you are right. what i am thinking now is to make the fields as read only instead of the submit button disable.so here is the scenarion.

Section 1 of the form is created by the inspector with approvals from manager and director.
once manager and director approved the form. Section 2 will be visible. however, i want the section 1 fields to be read only or disabled one manger and director approved the section 1. In this case, inspector can no longer change the values of the fields in section 1. same scenario until section 3. Section 3 has a final dropdown that the form has been closed. once the form has been closed, i want to make all the fields to be read only or disabled. i hope i make my scenario clear. Thanks.

Rob LeVineRob LeVine replied 1 month ago

You can use frm_setup_edit_fields_vars to set fields to read-only based on data in the form. Use this example and skip the part about "admin" https://formidableforms.com/knowledgebase/frm_setup_edit_fields_vars/#kb-set-fields-to-read-only-when-editing

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right