Forum Topic

Thanks for your participation and contribution.


Back to Front End

Remove empty variables from form post

Post a reply
754 views
i90runner
i90runner

Remove empty variables from form post

<script>
$(document).ready(function() {
  $('.remove-empty-values').submit(function() {
    $(this).find(':input').filter(function() { return !this.value; }).attr('disabled', 'disabled');
    return true; // make sure that the form is still submitted
  });
});
</script>
 <form class="remove-empty-values" id="searchform"  method="get" action="search">

Last updated

1-1 of 1

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.