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

Question

Question

Clear table JavaScript no longer works in Forms 10.3.1

asked on April 19, 2018

I have a Custom HTML button that I have been using to clear a tables values. The attached JavaScript also disables / enables 2 drop down menu's (this part still works)

 

$(document).ready(function() {
   $('.monclearbtn').click(function(){ //wait for button click
     $('table.mondayhide .singleline').val('');
	 $('table.mondayhide select').val('No');
     $('.mondayweekdrp select').prop('disabled', false);
     $('.mondaytermdrp select').prop('disabled', false);
    }); 
    
   $('.mondayweekdrp select').change(function() {
     
     $('.mondayweekdrp select').prop('disabled', true);
     $('.mondaytermdrp select').prop('disabled', true);
   });
});

The table CSS and field CSS have not changed. 

The button is configured this way...

<button type="button" class="monclearbtn">Clear table</button>

Before clicking the button...

After clicking the button (used to clear the table values)...

 

I'm having other table related JavaScript issues too...

https://answers.laserfiche.com/questions/140874/Javascript-to-hide-table-column-and-field-no-longer-working-in-Forms-1031#140886

 

Anyone else having Forms 10.3.1 issues?

0 0

Replies

replied on April 23, 2018

Hi Jonathan,

There used to be a bug that custom class on table field was applied to two elements (li element and table element). This got fixed in 10.3.1 and the class on table element was removed. It was documented in https://support.laserfiche.com/kb/1013929/release-notes-for-laserfiche-forms-10-3-1

  • A custom CSS class configured on a table field, like "$(''.table'')", would run twice, once on the li element and once on the table elements. It now only applies to the "$(''li.table'')", so some custom code may need to be updated. (36465)

So you can no longer use $('table.mondayhide .singleline') to find element in table. It can be $('.mondayhide .singleline')

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.