HTML and Squiffy - User Input to Variables

Hey guys.

I think this is my first post, so be gentle. ;)

Now, I'm having a bit of trouble working out how I can convert the user's input from the HTML <input type="text" /> box into a Squiffy {variable} (as a string).

I've tried all sorts of weird and wonderful things, but just can't seem to figure this out. The supposedly most obvious answer - GetElementById('id').value - didn't seem to work.

This is the (super basic) code I have:

[[START]]:
@clear
<h3>Character Creator</h3>

<h5>
First Name: <input type="text" name="firstName" /><br>
<br>
Surname: <input type="text" name="lastName" /><br>
<br>
Gender: {rotate playerGender:Male:Female}
<br>
<br>

[[Next]]

</h5>

You can ignore all the <br>s they are just for styling.

This is what it looks like:

Character Creator

First Name:

Surname:

Gender: Male/Female

So do you have any idea how I can fix this?

Is this what you mean?


I believe it is, thanks! Going to check if it works now...

After a few tries, it worked! Thanks so much :D


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums