Does anyone know anything about accessing a form submission with JavaScript within a passage?

0 votes
asked Dec 25, 2017 by silamander (390 points)

I want to have a form submission that is a little more streamlined than the "prompt" macro in Harlowe so I was wondering if anyone had any experience with form submissions through Twine before. This is the example I'm working with:

<!DOCTYPE html>

<p>Enter names in the fields, then click "Submit" to submit the form:</p>

<form id="frm1" action="/action_page.php">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br><br>
  <input type="button" onclick="myFunction()" value="Submit">

function myFunction() {



Please log in or register to answer this question.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.