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

Name header in roll-template not updating after change when rolled

Hello, I have 2 text fields that the player can edit. When the roll-button is clicked, it should take the name they assign in the edit field and make it the name in the roll-template. Here is the code for the roll template I have <button class="sheet-button-roll" type="roll" value="&{template:default} {{name=@{combat_style_name} Attacks!}} {{attack=[[1D20+@{combat_style_attribute}+@{combat_style_atk_bonus_cost}]]}} {{Damage=[[floor(@{combat_style_dmg_dice}+@{combat_style_dmg_bonus}+@{combat_style_dmg_attribute})*@{combat_style_dmg_mult}]]}} {{P+=[[@{combat_style_pen_plus}]]}} {{@{combat_style_dr_name_1}=[[10+@{combat_style_dr}]]}} {{@{combat_style_dr_name_2}= [[10+@{combat_style_dr_2}]]}}"><span style="font-size: small;"> Attack!<span></button> Field Text code: <input class="sheet-inputfield sheet-blue-color sheet-center" name="attr_combat_style_dr_name_2 " value="DR 2" style="width: 60px; font-size: smaller" title="Name your DR skills here" />     When the field is edited, the roll still has the old text.
1666058516
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
When you say "edited", do you mean that you've changed the text, but haven't clicked out of it or hit enter? AKA, clicking the roll button is the first time you've clicked out of the input? If so, this is just a technical limitation of how Roll20's backend is set up (heck, how most backends are set up). There are some ways around them, but they involve using Custom Roll Parsing, aka javascript powered rolls.
1666103918

Edited 1666118798
Scott,  The picture below shows the two fields in the red box. These are custom properties they can label. The issue is, when they change/edit the text in the inputfield, and either "Enter" or "Tab" or "Click Out", it does not update when the "Attack!" button is clicked and the data is spit out in the chat box. This is in the sandbox, btw.