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

Question

Question

Is there a way to create a floating text element that would scroll as the user scrolls up and down the form?

asked on October 11, 2021

Hi,

I have an expense reimbursement form with a Total field at the bottom.  I would like to know if it's possible, through CSS or JS, to have a pop-up type of element with the Total in it and have it positioned to the right of the other form fields like a post-it note, and have it scroll as the user scrolls.  It would also have to update automatically if the user adds or removes an expense item from a collection.

Any advice or examples would be very much appreciated.  Thank you!

 

0 0

Answer

SELECTED ANSWER
replied on October 13, 2021

Hi Mike,

Move your "Total" field to Top of your form and add a class name to it, for e.g, sticky.

Reference your class name in css.

.sticky {
   position: sticky;
}
2 0
replied on October 13, 2021

Thanks Mahesh; that works great.

0 0
replied on October 13, 2021

@████████ - I used float:right to get the text box to stay on the right side of the form and it actually looks more like a sticky note too.  Is there any way to get it to remain sticky to the bottom of the form and ignore section breaks?  Right now it stops scrolling as soon as it hits a Section in the form.

 

0 0

Replies

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

Sign in to reply to this post.