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

Question

Question

How to have a checkbox checked on initail form but unchecked on when saved to Laserfiche?

asked on March 4, 2015

I am looking to know how to have a checkbox which is checked on the initial form appear unchecked on the document saved into Laserfiche?  I am just using this as an example but the functionality is what I am looking for.

I am able to hide fields on the initial form and have them show up in the document saved to Laserfiche without issue but when trying to do the opposite I am having problems.

In regards to checking the box on initial form and having it unchecked in the document saved to Laserfiche I would expect the code below to work but it does not uncheck the box when saved to Laserfiche.

$(document).ready(function () {

  document.getElementById('Field162-0').checked = false;
    
  // CODE TO HIDE FIELDS ON FORM BUT NOT IN LF DOCUMENT
  if($('input[name="routingResumeId"]').val() =="") {
    document.getElementById('Field162-0').checked = true;
  }
  
});

I am actually trying to do something similar with showing a Custom HTML field on the initial form (which is only instructional information for the user) and then hide it in the document saved to Laserfiche with the same issues.

Is there something I am missing?   Any thoughts or suggestions?

0 0

Replies

replied on March 5, 2015

Hey Eric,

I perhaps had a similar issue recently and I resolved it by giving the checkbox a CSS class and using that CSS class to refer to the checkbox in the javascript. All other code remained the same, and it then did what I wanted.

Would you be able to provide a copy of the Forms Process XML file too if that doesn't help? We can take a look at the Form/Code directly then.

 

Thanks,

0 0
replied on April 21, 2015

Thanks for your input.  At the time I wasn't using CSS classes for the selectors but have since started using them.

Here is maybe a better example:

In my form when the form loads it renames the label for the first row of a table:
 

$(document).ready(function () {
   $(firstRow + ' td.col0').text('Caller'); // RENAME THE ROW 1 LABEL
});

This works fine but when I save the document to Laserfiche the row is no longer renamed.

I do something similar with changing the text for a Section header which also has the same problem.

How do I rename something like this or prevent it from changing back?

It seems like hiding on form initially and then showing the field when Saved into Laserfiche works without issue but not changing text, values, or properties.

Maybe I need to start a new thread.

0 0
replied on April 21, 2015

It must be something in my code because I did a simple form with only a table in it and renamed the first row label and then saved into laserfiche and the label was still changed.

I wonder what would break this.

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

Sign in to reply to this post.