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

Question

Question

Is there a way to have multiple label positions on a form?

asked on July 1, 2016

Is there a way to mix and match the Form labels to either be side-by-side, top, or bottom. I would like some fields to have the label on the top of the input area and other labels to be on the left side of the input box.

2 0

Replies

replied on June 18, 2019 Show version history

I played with it a bit further and I was able to accomplish it using the .cf-label class. My form has several hundred fields so I really didn't want to have to go through and give them all a class especially because I am already using a lot of CSS on the rest of the form. Hopefully this saves someone else a bit of time!

#q226 .cf-label {width: 38%}
#q226 .cf-small {width: 55%}
#q226 .cf-field {width: 50%}
#q226 input {text-align: right}
#q226 {width: 49%; display: inline-block}

#q227 .cf-label {width: 38%}
#q227 .cf-small {width: 55%}
#q227 .cf-field {width: 50%}
#q227 input {text-align: right}
#q227 {width: 49%; display: inline-block}

#q228 .cf-label {width: 38%}
#q228 .cf-small {width: 55%}
#q228 .cf-field {width: 50%}
#q228 input {text-align: right}
#q228 {width: 49%; display: inline-block}

#q229 .cf-label {width: 38%}
#q229 .cf-small {width: 55%}
#q229 .cf-field {width: 50%}
#q229 input {text-align: right}
#q229 {width: 49%; display: inline-block}

 

2 0
replied on July 5, 2016

You can set the labels alignment as Left in the Form settings. and add "top" in the CSS class for the filed that want to use top alignment, then add following JavaScript to set the alignment to top:

$(document).ready(function () {
  $('.top').removeClass('label-left');
});

 

1 0
replied on August 14, 2018

Would this work in reverse to move the labels to the left by adding the "label-left" class? I've tried but it hasn't been working. I'll include the various code I've tried.

 

$('#q14').addClass("label-left");
$('#q14 label').addClass("label-left");
$('.test').addClass("label-left");
$('.test label').addClass("label-left");

 

1 0
replied on June 17, 2019

Were you ever able to get something like this to work? I'm trying to accomplish something similar on my form. 

0 0
replied on June 18, 2019

Chelsey,

 

I ended up doing left labels and removing the "label-left" class from everything else. I found for some reason it didn't work the other way around for me. Hope that helps.

1 0
replied on July 1, 2016 Show version history

I would suggest using the CSS code .cf-label to get the desired results.

https://www.laserfiche.com/support/webhelp/laserficheforms/9.2/en-us/forms/#FormsCSS.htm?Highlight=.cf-label

 

0 1
replied on July 1, 2016

Tommy,

I was looking more for being able to reposition the field labels regardless of the field width. The steps I was taking was clicking on the Form Settings at the top of the form and setting the default to have the field labels appear above. I then would only like a few of the field labels to appear on the left side mainly for aesthitics.

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

Sign in to reply to this post.