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

Question

Question

Need to hide address field labels on submitted form

asked on June 26, 2018

I have a form with the "Address" field; however, the labels associated with this field are unnecessary on my form and actually make the saved form harder to read, so I hid them using javascript.  This works on form load; however, when the form is submitted, the labels still appear (as does the country, which I hid both the label and the field).  How can I get these labels to remain hidden when the form is saved to the repository?

I am running Laserfiche Forms Professional Version 10.2.1.327.

I have attached the javascript used to hide these fields below.  There is no other CSS targeting this field.  I do have a field rule that only shows this field when another field on the form matches either one of two choices, so if any choice besides those two is selected, the entire field remains hidden.

$(document).ready (function () {
   
  $(".Country").parent().children().val("USA");
  $(".Country").parent().children().css('display', 'none');
  $(".Address1").siblings().css('display', 'none');
  $(".Address2").siblings().css('display', 'none');
  $(".City").siblings().css('display', 'none');
  $(".State").siblings().css('display', 'none');
  $(".Postal").siblings().css('display', 'none');
  
 
});

Any thoughts or ideas are appreciated!

0 0

Answer

SELECTED ANSWER
replied on June 26, 2018

Hi Melanie,

 

Have you tried just using the CSS section to hide the labels?

Try this and see what you get:

.cf-helptext {display: none;}
.Country {display:none;}

 

I'm not sure what other fields may use the class cf-helptext, however all of the address fields seem to use it.

 

Regards,

Aaron

0 0
replied on June 27, 2018

Thank you so much, Aaron!  The .cf-helptext {display: none;} did the trick.  The .Country {display: none;} did not work, but I'm fine with that showing up on the saved form.  Now I have a nice form where the address prints but the labels for each address field do not take up extra space, and my form fits all on one page when saved to the repository.

0 0

Replies

replied on June 27, 2018 Show version history

Why not remove those fields from the form altogether? Could you hide them using field rules?

Also, you could copy the form and remove the fields you don't want. Then upon saving to the repository, use the form without the fields. 

Hope this helps,

Chris

 

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

Sign in to reply to this post.