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

Question

Question

Fields hidden through JavaScript are shown in Repository

asked on April 1, 2015

Hi, 

We have several fields that we are hiding/showing in the form using JavaScripts. 

When the form is submitted and it comes to repository, these hidden fields are not hidden anymore. We can see all of these hidden fields in the PDF (in repository). 

Is there a way to not show these hidden fields in the repository ? 

 

Thanks. 

0 0

Replies

replied on April 1, 2015 Show version history

You could just use white text and borders with CSS to visually hide the fields once the document is in the repository (example below):

#Field1 { border: solid 0pt #ffffff; color: #ffffff; }

 

0 0
replied on April 2, 2015

Hi Manish,

Which version of Forms are you using and what is your code to hide fields?

I'm using Forms 9.2.1.1069 and in file saved to repository, the field is still hidden. The code I used is this:

$(document).ready(function() {
  $('#q2').hide();
});

So I guess there may be something in your code blocking the show/hide field part.

0 0
replied on April 6, 2015

Hi, Rui,

We are using 9.2.1.1069 also. We tried the code you mentioned, but the hidden fields still show up in the repository. (Please see screenshot). 

Below is the snippet of the code we are using. 

            PranetLI.nextAll('li:[attr=XXXXX]').show()
        else
            PranetLI.nextAll('li:[attr=XXXXX]').hide();

 

Hidden Fields through JS still showing.jpg
0 0
replied on April 6, 2015

It's hard to adjust now whether the issue is caused by conditional statement not properly triggered, or JavaScript not working at all.

When you tried the code I mentioned, did you use a new process? Could you please try again with the process I attached in this reply? (Rename the extention of the file to .xml and fill the save to repository service before run it.)

  • The single line field is expected to be hidden, and if it still does not work then there may be something wrong with your system and I would suggest openning a support case on this.
  • If the field is correctly hidden in the saved file, then the issue should be within customization in your process. In this case more details on your process would be expected to further inspect the issue.
0 0
replied on April 16, 2015

Hi, 

The above recommendation did not work for us. 

I have attached our business process here. I would appreciate if you can look at it and provide recommendation. 


Thanks.

 

0 0
replied on April 17, 2015 Show version history

Did you encounter this issue when saving form "Without Pagination - Contract Form 2" to repository? I tried the process and found that subitems of "Question" under "Disclosure Section" which should be hidden would show up in file saved to repository.

If that is the case, the issue is that after form is submitted it would become read-only, and no element could be found using $("div.cf-section-block:last div.kx-repeatable div.form-q").

Instead, you can use $("div.cf-section-block:last div.kx-repeatable ul") when calling DisplayProviderSectionQuestions and DisplayProviderSectionSubItems on document ready function. In my test changing these two functions makes the fields hidden as expected in file saved in repository.

p.s, to find out what read-only form would look like, you check the form in a read-only user task.

1 0
replied on April 24, 2015

Thanks Rui. We tried the recommendation and it worked. 

Appreciate your help. 


 

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

Sign in to reply to this post.