I'm working on some DSTs that allow players to create some fields while editing the sheet. Since the fields can be dynamically created, they don't exist when the sheet is first loaded. Consequently, the field editor isn't connected to them (clicking on what should be an editable field has no effect). For fields created after page load, how can they be made editable by the sheet field editor? I could hook up my own editor, but would rather not add a module that replicates existing behavior.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I think I found it after digging around in Jp12x's "nWoD RELOADED!" sheet. The globally accessible
aisleten.characters
has two methods,bindField(fieldName, containerId, slug)
andbindAllFields(slug, containerId)
that set up editable fields.You might also take a look at "Kallak's Pathfinder 2E (mobile/tablet friendly)" DST.
https://www.obsidianportal.com/dynamic_sheet_templates/374
It has some dynamically added sections.
Obsidian Portal Developer
Thank you for the suggestion. That looks to use ChainsawXIV's library, which has its own editor. I may go that direction at some point, but for now
bindField
meets my requirement.Awesome! Glad you have a solution!
Obsidian Portal Developer