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

[Custom Character Sheet] Variable Maximums

<input type='number' name='attr_stradd' style='width: 50px' value='0' min='0' max='@{lvl}*5'> This should make the counter stop at a value of a multiple of 5 based on character level, but it doesn't. Is there a way to do this?
1484008389

Edited 1484008417
[Deleted]
Sheet Author
I would think maybe, <input type="number" name="attr_stradd" style="width: 50px;" value="some calculation here" min="0" max="@{lvl}*5" disabled="true"> The reason being, you can't set calculatory parameters in a fill-able box. The whole thing has to be a calculation, which will only run if the box is disabled. I could be entirely off the mark here, but I don't think you can set parameters on what a person can and can't put in a box other than whether or not it accepts numbers only.
1484011585

Edited 1484011718
vÍnce
Pro
Sheet Author
AFAIK, sheet attributes can't affect the html like that. &nbsp;Probably a security feature. Maybe try step="5" &nbsp; <a href="http://www.w3schools.com/tags/att_input_step.asp" rel="nofollow">http://www.w3schools.com/tags/att_input_step.asp</a>
Vince said: AFAIK, sheet attributes can't affect the html like that. &nbsp;Probably a security feature. Maybe try step="5" &nbsp; <a href="http://www.w3schools.com/tags/att_input_step.asp" rel="nofollow">http://www.w3schools.com/tags/att_input_step.asp</a> So, it would be Max="step 5"?&nbsp; Though that still doesn't solve the problem.&nbsp; Ah well, I was going for more asthetics, players only being able to put 5 points into an attribute per level, guess we'll just have to do that ourselves xD Thanks anyways.