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

Button on character sheet

So i was wondering if someone could help me out here. I know how to explain what i want to do. but i dont know what its called or how to do it.  Is there are way to move the up and down buttons in the a number input to either side of the input field with a + symbol and a - symbol on the other side. Removing the arrows from the box can centering the text. Is this something that can be done in roll20?  See Example Below?
1712814098
vÍnce
Pro
Sheet Author
Are you working on a custom sheet?  I would think this could be done using a text input field with action buttons for the + an - .  Use a sheetworker to add/subtract from the current value when the buttons are clicked.
Yes this is a custom sheet. Thank you for the information on the action buttons. Im still learning what things as called. i learned HTML, CSS. just because i was bored so i decided to make a sheet. so it has been about a year now. and im on my 9th version of the sheet. each time im learning how to improve the sheet.  Do you have any ideas on how i can remove the up and down arrows in the number field so the number is in the center of the field? 
1712841986
vÍnce
Pro
Sheet Author
Number fields have room for the spinners built-in.  I believe you can hide those, but I think they will appear when you give the field focus.  Changing the field to a text field will still allow number input and will eliminate the spinners all together, and it's going to be easier to adjust the placement of the value inside the field.  I rarely use number fields in sheets anymore.
Ok Thanks you have been a great help. 
1712848308
GiGs
Pro
Sheet Author
API Scripter
vÍnce said:  I rarely use number fields in sheets anymore. That's interesting. What do you use instead?
Let me ask this. what is the difference in text and number. Don't they both do the same thing. at the end?
1712857184

Edited 1712857223
GiGs
Pro
Sheet Author
API Scripter
It's all about data entry. A number input wont let you enter non-numbers, and text inputs will let you enter anything. From a sheet author's point of view, there is no real difference. Everything in SL is automatically saved as a string (theoretically, it's not always quite so clearcut). You might need to include a bit more error checking in sheet workers to make sure you are dealing with number, but I can't think of any other real difference. Those spinners on number fields (the +/- symbols) are nice to have on number inputs though.
Yah i was able to add the +/- buttons but i converted all inputs to text because i did not like the up/down arrows in the field because the number wan not centered.
1712861523

Edited 1712861548
GiGs
Pro
Sheet Author
API Scripter
You can get rid of the buttons inside the field with some CSS - there are some inputs I have them removed. /* Chrome, Safari, Edge, Opera */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {   -webkit-appearance : none ;   margin : 0 ; } /* Firefox */ input[type=number] {   -moz-appearance : textfield ; } If you want it to be conditional, add a class to the input and to the above declarations.
i will give that a shot and let you know how it works.  thanks
Another Question Is there a way to combine a Action button and a Roll button? 
1712867129
GiGs
Pro
Sheet Author
API Scripter
What do you mean by that? An action button can function as a roll button with some set up, thanks to custom roll parsing.
i would like to make a button that will add or subtract from a input and roll a dice.  Example i have a field for minor wounds that after a long rest heal 1d4. now i can have them subtract the wounds them self. but i would also like it if when they pushed the long rest button it refilled all hp as well to the charters max. 
1712886440
GiGs
Pro
Sheet Author
API Scripter
The only way to do combine changes to the character sheet and make a roll is with Custom Roll Parsing . If you just want to press a button and have changes made to the character sheet, nothing sent to chat, then a simple sheet worker being triggered by an action button will do the job. You can have several stats changes at the same time.
Thank you, That is something i will have to try to figre out another time. because as I said im still new. I dont know what i dont know. 
1712940289
vÍnce
Pro
Sheet Author
GiGs said: vÍnce said:  I rarely use number fields in sheets anymore. That's interesting. What do you use instead? I just use type="text".  If it's something that needs to be calculated I rely on sheetworkers to coerce integers and sometimes include checks on the value entry and set a warning if an inappropriate value is entered. (99% sure I learned that from you. Lol)
1712944208
GiGs
Pro
Sheet Author
API Scripter
vÍnce said: I just use type="text".  If it's something that needs to be calculated I rely on sheetworkers to coerce integers and sometimes include checks on the value entry and set a warning if an inappropriate value is entered. (99% sure I learned that from you. Lol) Probably :) I tend to prefer options which influence the ability of a player to enter stuff. I like number inputs because players cant enter text, I like selects (though they are awful in many ways) because players must choose from a list and cant enter typos. This can all be fixed at the sheet worker point, but I think there are different (but related) issues here.