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

Question

Question

Table Unexpectedly Adding Rows to Top Instead of Bottom

asked on October 13, 2021

This is just the weirdest thing.

I have a table for user notes that I add to most of my forms.  I've done it exactly the same way on 50+ forms.  When I set-up a new form, it's the first thing I add, or I use a template that already has it included.

I have one process, with two forms.  On one form, the table works like it always does, no surprises or issues.  But on the second form (which was started by being copied from the first form), the table is in reverse.  When I click the link to add a new row to the table, it adds to the top instead of the bottom.  It's so weird.

The only CSS I have that impacts the table is to hide the delete buttons.  The only Javascript that I have impacting the table adds a row with some info when the form is submitted - it's triggered by the submit/reject/approve buttons, so it wouldn't even come into play with manually adding a row by clicking the link.  Note that this is CSS and Javascript that I've reused over 50 times without this issue ever happening before.  There is absolutely nothing that I'm doing that would be causing the table the behave this way.

I've tried deleting and recreating the table, and it has the same behavior.

I can't find any settings or options that would do this.  When I use the browser's inspect element tool on the table from the effected form and compare to the table in any other form, I cannot see any differences between the two.  I'm just stumped.

Has anyone else ever encountered this behavior with tables?

0 0

Answer

SELECTED ANSWER
replied on October 13, 2021

I found it, and it was absolutely the stupidest thing...

While trying to narrow it down, I realized that a table at the top of my form worked, but any table I added to the bottom of my form didn't.  I started moving them around the form to try to pinpoint the issue, and discovered that a particular checkbox field on my form seemed to be the center of the issue, if the table was above the checkbox field, it worked normally, but underneath the checkbox field, it has the backwards behavior.

So then I started testing out different things on the checkbox field, and I found that I had one item in my checkbox that I was making a word bold.  But I have goofed, and done two opening tags for the bold, instead of an opening and closing tag.

I meant to do this:
<b>Bold Text</b>
But I accidentally did this:
<b>Bold Text<b>

The checkbox appeared fine (it was the last word in the text, so I didn't notice that it didn't stop bolding the text after the intended word), the rest of the form appeared fine, I didn't get any errors or issues in the console.  The only issue I had, was any table on the form below this checkbox field, was adding row to the top of the table instead of the bottom.

So damn weird...

2 0

Replies

replied on October 13, 2021

I have confirmed that it is NOT my CSS or Javascript that is causing the behavior - I temporarily removed all custom CSS and Javascript from the form, and it still had the same behavior.

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

Sign in to reply to this post.