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

Attribute-backed spans & disabled fields

I am using the Rogue Trader sheet with lots of (personal) upgrades.  The sheet was makes use of a lot of disabled fields, in including displaying the skill total in the button for said skill.  Because I am going to try and push my changes to Roll20, I am trying very hard to use the same names and formulas. Recently, something changed in Modzilla, and a disabled input indie of a button prevents that button from being clicked on.  You can tab over to the button and use the enter key, or if you previously dragged it to the marco bar, use it there.  I figured I would move the disabled field to a hidden area and make a attribute backed span to show the number.  This does allow the button to work, but instead of showing the total, the span reads the formula from the disabled field.  How do I get it not to do that?  
1554149849
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You'll need to switch your disabled field to either readonly or, since you're just hiding it anyways, a basic input. Regardless of which one you go for, you'll need to set the attribute value via sheetworker.
1554150979
Finderski
Pro
Sheet Author
Compendium Curator
If the disabled inputs are just for displaying values, you could also use spans with the input name. Something like: <input type='hidden' value='Something here' name='attr_somethinghere' /> <button type="roll" name='roll_rollsomething'><span name="attr_somethinghere'></span></button> That will show the value of the input in the button.  It's a pretty handy trick...
Finderski said: If the disabled inputs are just for displaying values, you could also use spans with the input name. Something like: <input type='hidden' value='Something here' name='attr_somethinghere' /> <button type="roll" name='roll_rollsomething'><span name="attr_somethinghere'></span></button> That will show the value of the input in the button.  It's a pretty handy trick... I do that currently, but the span is displaying: "floor((@{awareness1}+0.5)*@{per_total}+@{awareness2}+@{awareness3}+@{awareness4})". Which is annoying.  And will require a bigger coding project to fix 
1554152303
Finderski
Pro
Sheet Author
Compendium Curator
Coal Powered Puppet said: Finderski said: If the disabled inputs are just for displaying values, you could also use spans with the input name. Something like: <input type='hidden' value='Something here' name='attr_somethinghere' /> <button type="roll" name='roll_rollsomething'><span name="attr_somethinghere'></span></button> That will show the value of the input in the button.  It's a pretty handy trick... I do that currently, but the span is displaying: "floor((@{awareness1}+0.5)*@{per_total}+@{awareness2}+@{awareness3}+@{awareness4})". Which is annoying.  And will require a bigger coding project to fix  Ahhh...gotcha