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

Do checkboxes/forms work for API?

1517152486

Edited 1517152493
Figured I would ask before I started on this in case someone else had experience with this. Not to mention one of The Aaron's primary advice for scripts is to figure out the UI. So I am wanting to print out a list of items that the player can pick as many of the items they want, and then click a submit button. Do HTML forms work in the chat window if they are output by the API?
1517153316

Edited 1517157476
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Not that I'm aware of. That would make a lot of things easier tho. EDIT (Now that I'm not on mobile): The way I would handle this (learned from Aaron of course), is to have the script generate(and store) a unique code each time it sends a fresh menu. Then each "checkbox" would actually be an API command button that would send the info from that "checkbox" to the script tagged with the unique code of that set of menus. The script would store the input in an object indexed by codes, and then output a new menu, with the same code, to chat that indicates that option has been selected. Once the user is done selecting options, they'd click the "submit" button, which would again be an API command button, and send the execute command to the script which would take all the options saved in the object and use them as appropriate.