# Validates\_acceptance\_of (and hidden input)

**URL:** <https://www.ruby-forum.com/t/validates-acceptance-of-and-hidden-input/112624>\
**Category:** Rails\
**Created:** [August 21, 2007, 3:21pm UTC](https://www.ruby-forum.com/t/validates-acceptance-of-and-hidden-input/112624 "2007-08-21T15:21:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Post date:** [August 21, 2007, 3:21pm UTC](https://www.ruby-forum.com/t/validates-acceptance-of-and-hidden-input/112624/1 "2007-08-21T15:21:24Z")

</div>

Hi

Why does a failed “validates\_acceptance\_of” create a hidden input in  
the view?

cheers, jason

---

<div class="post-metadata">

**Author:** ![jasonb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Post date:** [August 21, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/validates-acceptance-of-and-hidden-input/112624/2 "2007-08-21T20:25:24Z")

</div>

Jason B. wrote:

> Hi
> 
> Why does a failed “validates\_acceptance\_of” create a hidden input in  
> the view?
> 
> cheers, jason

They don’t!

You need to show your code so we can see what you did wrong!

---

<div class="post-metadata">

**Author:** ![jasonb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Post date:** [August 21, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/validates-acceptance-of-and-hidden-input/112624/3 "2007-08-21T21:03:41Z")

</div>

actually, yes i think they do… check\_box has the habit of making a  
hidden input to represent the ‘unchecked’ value. not sure why, maybe  
it’s necessary to the rails internals, but the absence of the field  
from params should be enough IMO to know it’s not checked.

On Aug 21, 2:25 pm, Jamal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
