How do I retrieve the current SecurityID value after a page has been refreshed?
And then put that value into a Hidden Input Box within the SilverStripe Theme for example.
<input class="hidden nolabel" type="hidden" id="Form_Form_SecurityID" name="SecurityID" value="Current SecurityID value here" />
The reason I would like to be able to retrieve this value on refresh. Is because I'm using a newsletter module http://ssorg.bigbird.silverstripe.com/newsletter-module/ and I have hard coded the form into my SilverStripe theme using the 'Page Source' from the subscription page created within the CMS.
Screen dump: http://img707.imageshack.us/img707/314/newsletterareasample.jpg
<!-- Newsletter Code start -->
<div id="stylized">
<form id="Form_Form" action="/silverstripe/subscription/Form" method="post" enctype="application/x-www-form-urlencoded">
<img alt="Resources" src="$ThemeDir/images/Newsletter.gif" />
<label>Email
<span class="small">Add a valid address:</span>
</label>
<p id="Form_Form_error" class="message " style="display: none"></p>
<fieldset>
<div class="field CompositeField nolabel" id="MemberInfoSection">
<div id="Email" class="field text">
<div class="middleColumn">
<input type="text" class="text" id="Form_Form_Email" name="Email" value="" />
</div>
</div>
</div>
<input class="hidden nolabel" type="hidden" id="Form_Form_SecurityID" name="SecurityID" value="12119" />
<div class="clear"><!-- --></div>
</fieldset>
<div class="Actions">
<input class="action "
id="Form_Form_action_doSubscribe"
type="submit"
name="action_doSubscribe"
value="Submit"
title="Submit" />
</div>
</form>
</div>
<!-- Newsletter Code start -->
At the moment though because the valve '12119' does not change, the first subscription into the newsletter module works A okay but the second and third subscriptions return the error.
SecurityID doesn't match, possible CSRF attack.