You are viewing limited content. For full access, please sign in.

Question

Question

Remove "require" attribute for multi-line fields when rejecting/submitting a form

asked on July 31, 2019 Show version history

How do I use Javascript to override a multi-line required field (this field is also part of a table) when the form is "Rejected"?

This script works to override all other field types, regular expression constraints and calculations but not multi-line fields.

 
$(document).ready(function () {

//On Reject or Submit button click- bypass rejected fields/regx/calculations and allow to continue
  $('input.action-btn.ellipsis.Reject, input.action-btn.ellipsis.Submit').on('click', function() {
    $('input, select').each(function() {    
      $(this).removeAttr('required');
    });   
    
    $('.calculation_override input').removeClass('parsley-error');
    $('.calculation_override input').siblings('.parsley-errors-list').remove();
    
    $('.regex_override input').each(function() {
      $(this).removeAttr('pattern');
    });   
  });

});

Thank you!

Note: I am using Forms Professional 10.4

0 0

Answer

SELECTED ANSWER
replied on July 31, 2019 Show version history

I was able to accomplish what I wanted to do by modifying line 5 in the original post to:

    $('textarea, input, select').each(function() {    
0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.