CS Form - Hide Submit Button

Is there any easy way to hide the submit button based on the user’s form entries? In GravityForms there is a way to do this by enabling conditional logic on the submit button itself but I did not see it in CS Forms.

The form is used to verify a person’s eligibility to proceed to the next page.

Hey @graysonkent,

There is currently no condition for the submit form but I will list this as a feature request. For now, this would need custom development which is beyond the scope of our theme support. I’ll provide you with a custom code idea but we cannot continue supporting custom codes. This serves only as a guide. You can subscribe to our One service to continue receiving custom coding guidance.


Add this Custom JavaScript/jQuery snippet inside the Cornerstone Builder’s Page JS or Global JS.

Example: Hide the Submit Button based on a Checkbox or Dropdown

If you have an eligibility checkbox with the name eligible and you want to show the submit button only when it is checked:

jQuery(document).ready(function($) {
  // Replace with your field's selector/name and your button's class/ID
  var $checkbox = $('input[name="eligible"]');
  var $submitBtn = $('.your-submit-button-class'); // Add a custom class to your button in the builder

  function toggleSubmitButton() {
    if ($checkbox.is(':checked')) {
      $submitBtn.show(); // or $submitBtn.prop('disabled', false);
    } else {
      $submitBtn.hide(); // or $submitBtn.prop('disabled', true);
    }
  }

  // Run on load and on change
  toggleSubmitButton();
  $checkbox.on('change', toggleSubmitButton);
});

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.