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 - Attributes in Character Sheet Not Updating

Hello -  I have a couple of custom character sheets and have no issues with getting the "attr_attribute" tag in html to populate in the Attributes tab in the character sheet. The following code is not working and I cannot seem to figure out what is wrong. Thanks in advance to what I hope is an easy question to answer. <div class="playername2"><div><input type="text" name="attr_clue10" class="playerrotate"></div></div>
1614810434
David
Sheet Author
Is it not appearing in the attribute tab or are you putting a value in the input and when you open it is empty?
Both actually. I know that generally an attribute will not appear in the Attributes tab until a value is put in. Then it should appear and this is how it works for other fields. But for some reason, I will put in a value, and it will not appear in the Attributes tab. Thanks for the reply by the way.
Oh...and of note, when I put a value in and close the sheet, when I open it again, the value is gone.
1614811132

Edited 1614811175
David
Sheet Author
I pasted the code into a custom sheet and worked fine. I will send you a link to the test game.
1614811231
David
Sheet Author
How are you testing this?  With a custom sheet or a sandbox?
I have been testing it in the game in which I have attached the sheet.
1614813100
Andreas J.
Forum Champion
Sheet Author
Translator
Norman M. said: Both actually. I know that generally an attribute will not appear in the Attributes tab until a value is put in. Then it should appear and this is how it works for other fields. But for some reason, I will put in a value, and it will not appear in the Attributes tab. Thanks for the reply by the way. the A&A tab is a holdover from older times, before proper char sheets existed. Why is having it show up important to you? it's still saved.
I was just tying the two together. The important thing for me is for the data to stay on the character sheet and not dissapear everytime it is closed.
1614815362

Edited 1614815384
Andreas J.
Forum Champion
Sheet Author
Translator
As long as you use the proper name="attr_" format on all inputs, the values will be saved and persist.
I agree they should. In my case they are not on my sheet. The same code worked in David's test game, but it just isn't on mine. There must be something else at play that I am not seeing. Some sort of conflict. I am going to keep trouble-shooting.
1614816973
Andreas J.
Forum Champion
Sheet Author
Translator
I hope you aren't checking things in the preview panel, that isn't saving anything nor does it show sheets properly anyway(number 4 on the list). <a href="https://wiki.roll20.net/Building_Character_Sheets#Common_Mistakes" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Common_Mistakes</a>
No. Anytime you update the preview, everything goes away if you make any changes anyway. I am checking in the actual game.
1614820098
David
Sheet Author
Norman M. said: No. Anytime you update the preview, everything goes away if you make any changes anyway. I am checking in the actual game. Don't use the preview that thing has been busted as long as I have been on here.
1614820182

Edited 1614820213
David
Sheet Author
What size is the sheet? Can you paste the whole thing into a message, post or get it to us some other way?
It is pretty big, but I can try. I will put the html in one and the css in another. Give me a sec...
It's too big to fit here. I can try to create a GitHub and put it in there.&nbsp;
1614820718
David
Sheet Author
Do you use Discord?
I do. Also, I put the code in Github. I will send you the link.
1614821726
David
Sheet Author
Your HTML seems to working Ok in that test game I setup. Something that should be unrelated but your first two inputs are type="secret.&nbsp; I have you tried copying the game and seeing how the copy behaves? There is something else I can check.&nbsp;&nbsp;
1614822036
David
Sheet Author
Actually the player attributes are the ones not saving because you have the type as text3. &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="playername4"&gt;&lt;div&gt;&lt;input type="text3" name="attr_player9" class="playerrotate"/&gt;&lt;/div&gt;&lt;/div&gt;
1614822145
David
Sheet Author
&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="playername4"&gt;&lt;div&gt;&lt;input type="text3" name="attr_player9" class="playerrotate"/&gt;&lt;/div&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="playername4"&gt;&lt;div&gt;&lt;input type="text3" name="attr_player7" class="playerrotate"/&gt;&lt;/div&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="playername4"&gt;&lt;div&gt;&lt;input type="text3" name="attr_player5" class="playerrotate"/&gt;&lt;/div&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="playername4"&gt;&lt;div&gt;&lt;input type="text3" name="attr_player3" class="playerrotate"/&gt;&lt;/div&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="playername3"&gt;&lt;div&gt;&lt;input type="text2" name="attr_player1" class="playerrotate"/&gt;&lt;/div&gt;&lt;/div&gt;
Why is that a problem? What whould it be?
Let me try to move around some formatting elements so I can just use "text" to see if that clears things up...
1614822265
David
Sheet Author
Type="text".&nbsp; Roll20 only looks for certain types to save.
1614822413
David
Sheet Author
<a href="https://wiki.roll20.net/Building_Character_Sheets#Storing_User_Data" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Storing_User_Data</a> Text &amp; Numbers To create a field for saving text or numbers entered by the user, the following elements can be used: &lt;input type="text"&gt; &nbsp; MDN documentation &lt;input type="number"&gt; &nbsp; MDN documentation &lt;textarea&gt; &nbsp; MDN documentation Note: &nbsp; &lt;input&gt; -elements must have a specified type, and the input types that work on Roll20 are: ( text ,&nbsp; number ,&nbsp; hidden ,&nbsp; checkbox ,&nbsp; radio &nbsp;and&nbsp; range ).
Ah. I figured it would be something simple and right in front of my face. Thank you so much for taking the time.
1614822556
David
Sheet Author
No problem.&nbsp; I feel your pain.&nbsp; Happy coding.