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

Simple Math breaking my brain

I am working on a character sheet for Iron Kingdoms and I can't get simple addition to run right. While I have grabbed a simple character sheet (which help impressively on the sheet construction), I am having difficulty in making math work. Using what was put on the wiki, I made the following set of three lines: <input type="text" name= "attr_joe" value= "0" /> <input type="text" name= "attr_bob" value= "0" /> <input type="text" name= "joebob" value= "@{joe}+@{bob}" disabled="true" And I get two fields in which I can input numbers, and a grayed out field (sometime the gray field has "@{attr_joe}+@{attr_bob}" in it. I have added & removed "attr_" to bob and joe, added and removed spaces, added and removed the "@" symbols, added and removed the value"0", changed the text to numbers and so on. And...I got nuttin. This is the second simplest thing to do on html and its kicking by backside. Its one of those "if I can just figure out how to make this work, I can do the whole sheet! moments. Anyone out there can break it down? I would greatly appreciate it.
1418253313
Actoba
Pro
Sheet Author
You dont need the "attr_ "when using attributes...just when they are initially defined. Auto calced fields need to be type="number" too, and not text.....and it looks like joe and bob in your example should probably be number too. I'd advise using disabled="disabled" for autocalc fields but thats not what your issue is here...thats just me being amore than a little fussy about the html definition...some would argue the way you have it is fine. Seriously though...type="number" is what you want :)
Thanks for the tip on the "attr_". I did swap all the type="text" to type="number" before, but tried it again, just to be sure. No dice. I also tried disabled="disabled". Again, no dice. Maybe its because I'm using Chrome?
1418254657
Diana P
Pro
Sheet Author
Did you try giving the jobbob field an attr_ ? ie: <input type="text" name= "attr_joebob" value= "@{joe}+@{bob}" disabled="true" />
Oh wow. THAT fixed it! Dianna, you are my new favorite person. Me and buddy have been working on this for tat least two hours. We're pretty new to html, even though he is brilliant. But now, its working. Thank you! Seriously, thank you both Actoba and Diana P. Yawl have helped immensely.