I'm new to modx and need to put a news letter signup form on my webpage...
I have a "footer" chunk with the form markup on it and under this the call to my custom form processing snippet:
<form id="nl-form" action="[[~[[*id]]]]" method="post">
<input class="field" type="text" name"nl-name" placeholder="Name" value="" />
<input class="field" type="email" name"nl-email" placeholder="Email" value="" />
<input class="button" type="submit" name="nl-submit" value="Sends" />
</form>
[[!form-newsletter]]
Below I have the form-newsletter code. It was more than this but I stripped it back to its bare minimum to see if the code was even being hit and I get nothing. I might be being a bit stupid as it's been a while since I did PHP, but im pretty sure this should work? Any ideas as to what I've done wrong as I'm pulling at straws right now. I'm using Revo 2.2.13 Traditional.
<?php
$output = '';
if(isset($_POST['nl-submit'])) {
$output .= $_POST['nl-name'];
}
return $output;
[ed. note: dorzal last edited this post 12 years, 6 months ago.]