Skip to content

Instantly share code, notes, and snippets.

@timcowlishaw
Created June 11, 2009 15:21
Show Gist options
  • Save timcowlishaw/127969 to your computer and use it in GitHub Desktop.
Save timcowlishaw/127969 to your computer and use it in GitHub Desktop.
<p class="check t_and_cs">
<%= form.check_box :terms_and_conditions %> <strong>Please tick here to confirm that you agree with these Terms and
Conditions.</strong>
<%# This is a rather nasty hack - we don't need the
hidden form as the ts and cs have to be accepted, and
having two form elements with the same name buggers the
jquery validation code. However, Rails yet-again fucks
anyone who tries to do anything that DHH hasn't, as
'opinionated software' is basically a euphemism for
'lazy programmers', so we can't do this server side. %>
<script type="text/javascript">
$(".t_and_cs input[type=hidden]").remove();
</script>
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment