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

Creating an Attribute...Help?

Ok...despite going through the mind-bending process of teaching myself how to create a custom character sheet, I have to admit I am still completely lost on one simple coding concept *hangs head in shame* Can someone please, please, tell me how to define an Attribute so that it can be used by tokens, macros, etc. I don't want to display it on the sheet!!!! I just want to define it!!!!   so that I can use it within the character sheet calculations....that's it... All I need is the code, and I am buggered if I can get it to work  :'( If someone can give me the syntax I would be eternally grateful...let's call the Attribute "Blah" just for the sake of simplicity.... Thanks in advance. Ray
1557797717

Edited 1557797729
Finderski
Pro
Sheet Author
Compendium Curator
<input type="hidden" name="attr_Blah" /> I hope this helps. :)
Finderski said: <input type="hidden" name="attr_Blah" /> I hope this helps. :) Just a question....what is the "/" at the end for??  Is it required?? or can I just have: <input type="hidden" name="attr_Blah">
1557800710
vÍnce
Pro
Sheet Author
The backslash isn't required(it might have been at one time to validate...) Many people include it on inputs.  I do as well since I've seen many examples that also include them.
It's a hold over from XHTML/XML that indicates a "self-closing" tag, i.e.,&nbsp; &lt;sometag /&gt; was equivalent to &lt;sometag&gt;&lt;/sometag&gt;.&nbsp; In HTML5, for void elements (elements that cannot have any content) like &lt;input&gt;, there's no such thing as end tag so real proper way to write it is &lt;input&gt; but the HTML5 specs allows for optional /.&nbsp; See item 6 under start tag :&nbsp; <a href="https://www.w3.org/TR/html5/syntax.html#start-tags" rel="nofollow">https://www.w3.org/TR/html5/syntax.html#start-tags</a> &nbsp;
Thanks for your help everyone...I'm making forward progress again at last&nbsp; :D