0 votes
by (330 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() {



2 Answers

0 votes
by (2.7k points)

Hi silamander,

could you check out


That is an example for 1 input field, which actually worked for me (Twine2.2.1/Harlowe2).


0 votes
by (159k points)

Is the story HTML file you generated via the Publish to File option being hosted on the same web-server as the action_page.php file?

What type of Response will the web-server be returning? and what do you want the current page of story HTML file to do with that Response.

note: You ideally should include a method attribute on your form element, so there is no confusion about if it's a POST or a GET Request. (I am assuming you want to send a POST Request.)