Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Pattern attribute is stripped from html code

The pattern attribute is automatically stripped from code of a custom sheet. This could be very useful for the css markup. For one example, a text input could grow to a 2nd size if it had enough characters. But, I have had many ideas for using it. If you add it back to the code with DevTools, it works perfectly. Is there any way to ask roll20 to not strip it?
1772607990

Edited 1772608081
vÍnce
Pro
Sheet Author
Hi Wraithmoor, Seems like the pattern attribute would be handy for enforcing input validation.&nbsp; If the VTT removes it for "reasons", you're basically out of luck. Maybe create a suggestion to get it implemented? You could use sheet workers to validate and/or force the proper user input if that's your goal. If you are wanting to auto-expand an input to fit the user input, this might help; <a href="https://wiki.roll20.net/CSS_Wizardry#Content-scaled_Inputs" rel="nofollow">https://wiki.roll20.net/CSS_Wizardry#Content-scaled_Inputs</a>
It seems like not stripping pattern wouldn't get 20 votes, so I didn't bother posting it there. If there's another way to suggest it, I'd do it. Thanks for that link. I do that sometimes but was worried it bloated the code. I also use radios or checkboxes of the same attr_ name to activate the css, and have been thinking that a proceeding hidden number input with a max of 999 might be good for expanding large number text inputs.