This awesome project was born when my friend and colleague Fred Audet generously shared his BIG IDEA with me and tried to have me work on it. Thing is, I was already drowning in an overabundance of jobs and had no time for my pal. But on a hot and relentless evening, I decided to take the bull by the horns and use my precious hours to finally do it and create a very cool library that Fred and all of you guys can use.
The idea is to use PHP to send auto generated emails. The library needs to be cross-browser and fully compatible with any simple form code.
Only 5k and supporting multi-lang (english, français, and you can add your own). Work well with input, radio, checkbox and hidden field!
<form action="amail.php" method="post" id="form-demo">
<p>
<label for="name">Full Name</label><br />
<input type="text" name="name" id="name" value="" />
</p>
<p>
<label for="email">Email</label><br />
<input type="text" name="email" id="email" value="your.name@domain.com" />
</p>
<p>
<label for="website">Website Url</label><br />
<input type="text" name="website" id="website" value="http://" />
</p>
<p>
<label for="comment">Comments and/or Suggestions</label><br />
<textarea name="comment" id="comment"></textarea>
</p>
<button type="submit" name="submit">Send</button>
</form>
<script type="text/javascript" src="amail.js"></script>
<script type="text/javascript">amail.add('form-demo');</script>
available tags
in 'header':
{subject} = the subject of the email
in 'footer':
nothing (for the moment)
in 'each':
{key} = label or name of the field
{value} = content from the user
If you want the form to be replaced with the confirmation message, add a div over the form with the id: amail-msg
roboys © copyright 2009 - terms and conditions