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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Input value set to another input displays only numbers

1428093183
Kryx
Pro
Sheet Author
API Scripter
<input type="text" name="attr_rangedrange4"> <input type="text" class="sheet-center" name="attr_rangedrange4_quick" value="@{rangedrange4}" disabled="disabled"> if rangedrange4 is set to "20ft" it reads as "20". If it is set to "20/60ft" it reads as "0.33333". Other fields for instance weapon names can be set to "Greatsword" and the reference field will show "Greatsword". Though if the initial field is set to "Greatsword 2" then the reference field becomes "2". Could you please fix this so we can reference the text & numbers of other fields?
1428098203
Lithl
Pro
Sheet Author
API Scripter
Autocalc fields strip out all non-numeric characters (which are not operators or functions). They are meant for math only.
1428098462

Edited 1428098546
Kryx
Pro
Sheet Author
API Scripter
Brian said: Autocalc fields strip out all non-numeric characters (which are not operators or functions). They are meant for math only. It doesn't strip out all characters. It only strips out characters if there is a number. Seemingly that should only happen for input type="number" and not for text fields. Without being able to reference another input it makes being able to display "quick info" on the main page very difficult.
Mark said: Brian said: Autocalc fields strip out all non-numeric characters (which are not operators or functions). They are meant for math only. It doesn't strip out all characters. It only strips out characters if there is a number. Seemingly that should only happen for input type="number" and not for text fields. Without being able to reference another input it makes being able to display "quick info" on the main page very difficult. We may be able to add another "type" of field to do this, but as Brian said currently the "disabled=true" indicates a calculating field and calculating means the result will the coerced to a number. If there is no number present you are probably getting an error in your console log (so basically it's silently failing). I'm going to close this since it isn't actually a bug. Feel free to make a suggestion for a new type of field that can just re-print values from other fields, though.