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

[Help] Part of the sheet is not saving any data

I've made a custom sheet where I'Ve run into the problem that part of the data is neither saved nor filled in again after reloading the charsheet. input type="text" name="attr_name"   <-- works quite fine input type="number" name="attr_STR" value="0" <-- works fine input type="number" name="attr_STR_modifier" value="0" <--works fine input type="number" name="attr_STR_total" value="@{STR} + @{STR_Modifier}" disabled="true"  <-- also works fine input type="text" name="attr_Craving3" <--does not work at all I'm a bit out of  ideads there as to what could be possible reasons. Any help would be appreciated there.
1441983331
vÍnce
Pro
Sheet Author
Maybe post the entire line of Cravings3 Tom.  Perhaps an improper closing or incomplete tag?
Working example <td> <input type="number" name="attr_STR" value="0"/> </td> <td> <input type="number" name="attr_STR_modifier" value="0"/> </td> <td> <input type="number" name="attr_STR_total" value="@{STR} + @{STR_Modifier}" disabled="true"/> </td> <td> <input type="number" name="attr_STR_super" value="0"/> Nonworking parts <tr> <td><input type="text" name="attr_Craving1"/></td> <td><input type="number" name="attr_CravingRating1"/></td> <td><input type="number" name="attr_CravingRatingCurrent1"/></td> <td><input type="text" name="attr_Craving2"/></td> <td><input type="number" name="attr_CravingRating2"/></td> <td><input type="number" name="attr_CravingRatingCurrent2"/></td> </tr> ---- <tr> <td><input name="attr_RacialTrait1" /></td> <td><textarea name="attr_RacialTraitEffect1"></textarea></td> <td><input name="attr_RacialTrait2" /></td> <td><textarea name="attr_RacialTraitEffect2"></textarea></td> </tr>
Craving 1 and craving 2 also dont work
1441994807

Edited 1441994915
vÍnce
Pro
Sheet Author
Values? On my cell, so I can't test. ;-(
I didn't put in default values for those. Can that be the reason? (would find it unusal thogh)
1442001586
vÍnce
Pro
Sheet Author
I always include them to be safe, even if it's just value="".  I would give it a try.  
Nope no differnce there. Strangely for: <td><input name="attr_RacialTrait1" value="" /></td> <td><textarea name="attr_RacialTraitEffect1" value=""></textarea></td> <td><input name="attr_RacialTrait2" value="" /></td> <td><textarea name="attr_RacialTraitEffect2" value=""></textarea></td> It is so that RacialTrait1 and 2 does not save  while TraitEffect 1 and 2 DOES save. would it help if I put up the whole sheet here or in a pastebin? (its 520 lines large)
1442003341
vÍnce
Pro
Sheet Author
Sure, link the code.  I'll have a look after work.  Maybe someone( Brian...), will have a fix.
<a href="http://pastebin.com/GWMxw9KA" rel="nofollow">http://pastebin.com/GWMxw9KA</a> &nbsp;is the code.
1442017593
Diana P
Pro
Sheet Author
Tom E. said: Nope no differnce there. Strangely for: &lt;td&gt;&lt;input name="attr_RacialTrait1" value="" /&gt;&lt;/td&gt; &lt;td&gt;&lt;textarea name="attr_RacialTraitEffect1" value=""&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;td&gt;&lt;input name="attr_RacialTrait2" value="" /&gt;&lt;/td&gt; &lt;td&gt;&lt;textarea name="attr_RacialTraitEffect2" value=""&gt;&lt;/textarea&gt;&lt;/td&gt; It is so that RacialTrait1 and 2 does not save &nbsp;while TraitEffect 1 and 2 DOES save. would it help if I put up the whole sheet here or in a pastebin? (its 520 lines large) The inputs need a type="text"; html input does not have a default type.&nbsp; Text areas don't need that because they are always text. The cravings section seems to work with the code you pasted in the pastebin.
1442018950

Edited 1442019163
vÍnce
Pro
Sheet Author
Cravings and Racial Traits both work for me.
ok the type="text" was it. thanks a lot!
1442019190
vÍnce
Pro
Sheet Author
cool
1442019526
Diana P
Pro
Sheet Author
Excellent! :)
1442029440
Lithl
Pro
Sheet Author
API Scripter
Diana P said: The inputs need a type="text"; html input does not have a default type.&nbsp; Text areas don't need that because they are always text. Well, input actually does &nbsp;default to type="text", but it's entirely possible that the code Roll20 uses for saving the data depends on the existence of the attribute.
1442030071
Diana P
Pro
Sheet Author
*Bows to the Brian*&nbsp; I stand corrected.&nbsp; I just know from empirical evidence (it having been 15 years since I've done general html programming) that Roll20 requires the attribute.&nbsp; :)
1442037414
Lithl
Pro
Sheet Author
API Scripter
Yeah, I can think of several ways that the system could have been written which requires the attribute, so I'm not entirely surprised. It's a good idea to include it anyway in your HTML (even when making a regular webpage), just in case. =)