Making a form
You can make for example a contact form, if you use HTML items, maybe paragraph or heading items, and a button item.
You should give an id to your input areas:
<input id="name" />
And to the textareas:
<textarea id="message"> </textarea>
Which can be used with the button item to get out the content from them. After you get the data, just send them to a php file, where you can do whatever you want with these texts. This should go on the Button item’s Event on Mouseclick option:
My code is:
var n = encodeURI(jQuery('#name').val()); var e = encodeURI(jQuery('#email').val()); var m = encodeURI(jQuery('#message').val()); window.location.href = "http://example.com/email.php?n=" + n + "&e=" + e + "&m=" + m;
The http://example.com/email.php should be a link to your php file.
In the php file get the variables, and use them, for example send them through an email, then go back to your website:
<?php $name = urldecode($_GET['n']); $email = urldecode($_GET['e']); $message = urldecode($_GET['m']); $headers = "FROM: " . $name . " <" . $email . ">\r\n"; mail("firstname.lastname@example.org", "message subject " . $headers, $message); header("Location: http://example.com"); ?>
Note: our slider does not control the size of the HTML items, so make sure, that your layer is big enough to have space for them on smaller screens too.