Hello, I have a form that has a datetime field on it and I know the input won't be large so I've tried to shorten the width of the field. However, there is a space AND the date picker icon that does not allow me to do this. The picture included is what happens when I try to shorten the width, with the field getting covered up. I would love some help with this please and thank you.
Question
Question
How to change the length of the datetime field in a table?
Answer
I figured it out! I had the default label alignment set to "Left" on the form and I guess it was messing with the date field within the table! So what I did was add the class "top_label" that I had created that makes the field label set to the top.
CSS for top_label:
.top_label .form-q {
display: block;
}
Thank you all for helping!
Replies
I'm not smarter than Matthew as he's one of the forum greats here, but have you given the css rules you have a border property like:
border: 1px solid red; border: 1px solid blue; etc
This would help see what all classes are affected by your width properties.
Also, you could download the form and upload it here I think for someone to look at it. I believe we are allowed to do that?
Based on your screenshot, it looks like you are using the Forms Layout Designer (new designer). In the Forms Layout Designer, you can resize the table columns by dragging on the border between columns. I don't believe I have personally seen that issue with a date field being kind of cut off in the table like that.
Can you verify what version of Forms you are on? To see the version number, in Forms go to the [Your Name] menu and select About.
Also, have you applied any CSS to this field to impact how it is displayed?
I'm on "Laserfiche Forms Professional Version 11.0.2212.30987" and there is some css:
.pdc fl-date-time {
padding-top: 2px !important;
padding-bottom: 0px !important;
}
That's the same version I'm on, and it's only a bit behind the most recent release (version 11.0.2212.31000) from a couple weeks ago.
Do you have any other CSS that could be impacting that field. I've tried to replicate your table with the CSS you provided, along with similar CSS for the single-line and number fields, and I see it looking like this. It isn't losing part of the field:
This is the only CSS I'm using on this test:
.pdc fl-date-time { padding-top: 2px !important; padding-bottom: 0px !important; } .pdc fl-single-line { padding-top: 2px !important; padding-bottom: 0px !important; } .pdc fl-number { padding-top: 2px !important; padding-bottom: 0px !important; }
This is all of the css that I'm using on this form:
.form-info {
display: none;
}
.cf-formtitle {
display: none;
}
.pane {
padding-top: 1px !important;
padding-bottom: 3px !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.hidelabel .section-title {
display: none;
}
.top_label .form-q {
display: block;
}
.nowrap {
white-space: nowrap;
width: 500px;
}
.form-q {
line-height: 20px;
}
/* No Padding For Single Line */
.pdc fl-single-line {
padding-top: 2px !important;
padding-bottom: 0px !important;
}
.pdc fl-multi-line {
padding-top: 2px !important;
padding-bottom: 0px !important;
}
/* No Padding For Single Line */
.pdc fl-date-time {
padding-top: 2px !important;
padding-bottom: 0px !important;
}
.pdc fl-file-upload {
padding-top: 0px !important;
padding-bottom: 0px !important;
}
.pdc fl-number {
padding-top: 2px !important;
padding-bottom: 0px !important;
}
.pdc fl-checkbox {
padding-top: 2px !important;
padding-bottom: 0px !important;
}
.pdc fl-signature{
padding-top: 2px !important;
padding-bottom: 2px !important;
}
I can't honestly remember or know if any of it would affect my table.
FYI - you can use the "{...} code" button on this site to make your code easier to read.
Are you applying CSS Classes to any of the specific fields? I'm still not replicating the exact issue from your screenshot, but it did act very weird in the designer when I added that "nowrap" class to the date field in the table.
There are no CSS classes assigned to that specific date field.
Ugh. I'm not certain why it's doing it to you, but not when I try to replicate it.
What happens if you rearrange the columns in the table, such as moving the date after the invoice number, does it still continue to cutoff part of the field width?
It does, here's a screenshot:
I'm really sorry, but I'm kind of out of ideas. Because I can't replicate the issue based on the information you have shared here.
Even if I make the field super small, it still doesn't exceed the width of the column.
The only way I could replicate it in any form was with extra CSS, like this:
.pdc fl-date-time { width: 120% !important; }
But of course, that's not the issue, because you've provided all the CSS you have on your form, and nothing in your CSS is doing anything like that.
It can be a little tricky sometimes, but you should be able to dig through the field and its various components in the "Inspect" part of your browser to try to identify what is causing the behavior. For example, the CSS I included just above looks like this in the "Inspect" screen:
I'm sorry I wasn't able to be of more assistance. Hopefully someone smarter than me chimes in and know what is happening here. Failing that, you may want to ask your Solution Provider to take a look. Good luck.