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 .
×
Create a free account

[sheet authors] readonly input vs named spans

1580253988
vÍnce
Pro
Sheet Author
Other than aesthetics, is there much benefit for using a named span vs readonly inputs? example, say I want to display the value of @{foobar_total} normally I would use just use the readonly input wherever I wanted to display the total. <input type="number" name="attr_foobar_total" value="0" readonly /> vs a hidden input and span <input type="hidden" name="attr_foobar_total" value="0" /> <span name="attr_foobar_total"></span> then simply copying the span wherever needed for display. I'm leaning toward it being primarily an aesthetics/css benefit, but I'm curious to hear someone else's opinion.  Thanks
1580257613

Edited 1580257631
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It's primarily a css benefit of potentially not needing to overwrite quite so much style wise. I'll also note that,except in repeating sections, you don't need the duplicate input.
1580257825
vÍnce
Pro
Sheet Author
Scott C. said: It's primarily a css benefit of potentially not needing to overwrite quite so much style wise. I'll also note that,except in repeating sections, you don't need the duplicate input. Thanks Scott.  and good to know.