# Having problem with validates\_presence\_of fields in form when trying to also use ActiveScaffold (x-

**URL:** <https://www.ruby-forum.com/t/having-problem-with-validates-presence-of-fields-in-form-when-trying-to-also-use-activescaffold-x/135111>\
**Category:** Rails\
**Created:** [April 17, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/having-problem-with-validates-presence-of-fields-in-form-when-trying-to-also-use-activescaffold-x/135111 "2008-04-17T23:47:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [April 17, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/having-problem-with-validates-presence-of-fields-in-form-when-trying-to-also-use-activescaffold-x/135111/1 "2008-04-17T23:47:47Z")

</div>

I have an events listing site that includes the models Event and  
DateAndTime, so an event that happens more than once (like a high  
school play) can have more than one date\_and\_time. The Event model  
has\_many date\_and\_times, and the DateAndTime model belongs\_to event.  
The Event model validates\_presence\_of two submission form variables,  
the\_date and the\_time, and those variable values then get used to  
create a new date\_and\_time object once the form is submitted.

My ActiveScaffold problem is that when the update form for the Event  
model displays, it shows all the correct dates and times in drop-down  
lists (with the ability to either edit or delete them) PLUS an _extra_  
date and time field that’s set by default to the current date and  
time, with no way to delete that field. The update form is created  
with this new additional date field required, even though the event  
object already has other date\_and\_time objects associated with it.

Any ideas how I can make my Event update form display without the new  
date and time non-deletable field in ActiveScaffold, while still  
requiring date and time submissions on the public site’s Event  
creation form?

Thank you.
