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

Input not working

I feel like the solution is simple and im just not finding it. I have a field the want to show 2d4 and make it so that it is disabled="true" but when i do that it out outs 24 and not 2d4. If i change it to readonly it displays correctly. Can someone tell me what im doing wrong. below is the HTML im using. <div class="force_troop_asset_b"><!-- Light Cavalry -->     <button name="act_light_cavalry_p" class="button5" type="action">Light Cavalry</button>     <input name="attr_light_cavalry_qty" class="text030" type="text" value="0">     <h6>&nbsp </h6>     <input name="attr_light_cavalry_purchase" class="text050" type="text" value="5" disabled="true">     <input name="attr_light_cavalry_stone" class="text050" type="text" value="0" disabled="true">     <input name="attr_light_cavalry_wood" class="text050" type="text" value="0" disabled="true">     <input name="attr_light_cavalry_metal" class="text050" type="text" value="0" disabled="true">     <h6>&nbsp </h6>     <input name="attr_light_cavalry_food" class="text050" type="text" value="1" disabled="true">     <input name="attr_light_cavalry_coin" class="text050" type="text" value="1" disabled="true">     <input name="attr_light_cavalry_citizen" class="text050" type="text" value="1" disabled="true">     <h6>&nbsp </h6>     <input name="attr_light_cavalry_hp" class="text050" type="text" value="15 HP" disabled="true">     <input name="attr_light_cavalry_attack" class="text050" type="text" value="4d4" readonly />     <input name="attr_light_cavalry_counter" class="text050" type="text" value="2d4" readonly />     <input name="attr_light_cavalry_speed" class="text050" type="text" value="1 Hex" disabled="true">     <h6>&nbsp </h6>     <button name="act_light_cavalry_rolls" class="button6" type="action">Force 3</button>     <button name="act_light_cavalry_i" class="button7" type="action">Info</button> </div>
1713286509
GiGs
Pro
Sheet Author
API Scripter
How is it outputting or showing 24? Cann you give specific example shere it happens, what does happen and what you expect to happen? By the way you don't have to do disabled="true" you can just do disabled (like you do with readonly).
the HTML i sent is for one line. there are 3 line that are doing the same thing. They should show 2d4 and 4d4 but they are showing as 24 and 44. 
1713366647
GiGs
Pro
Sheet Author
API Scripter
Yes, but which rows are they ? I don't see anything in the code that would cause this. If the inputs where type-"number", I could see it maybe happening. Now I'm wondering what the CSS for those buttons is, and also if you have any sheet workers changing those entries. Create a new character, and report what is shown in the HP, Attack, and Counter columns before you change anything anywhere on the sheet.
1713367097

Edited 1713367340
Well tried the create a new character sheet but that did not work. I can add the HTML and CSS for the sheet if you want. it is also removingthe word Hex in speed line and the letter HP in the HP line.
1713384019
GiGs
Pro
Sheet Author
API Scripter
It's acting like those inputs are not allowing anything but numbers. Try removing the class="text050" to see if that is doing anything. You can do this without removing the entry; just go to the CSS file, find that class, remove the contents of the text050, save the file, reload the CSS try to enter text containing letters (like 2d4) into one of those textboxes then back in the CSS file, use UNDO to get back what was removed. It's important to load the file with the CSS removed to see if there's any difference in behaviour.