Well I am using Hobo, which in my case generates form with boolean fields as checkbox. Form is rendered from following dryml: <def tag="win-form" for="Lead"> <form lifecycle="win" merge param="default"> <error-messages param/> <input type="hidden" name="key" value="&this.lifecycle.provided_key" if="&this.lifecycle.provided_key"/ > <field-list fields="proposal, duration, value, contract_signed, start_at_risk" param/> <div param="actions"> <submit label="#{ht 'leads.actions.win', :default=>['Win']}" param/><or-cancel param="cancel"/> </div> </form> </def> Validation I want to use would be placed in Lead model for specified transition, but if we could do it other way it would be fine too.
To be honest I am not sure how to put javascript inside it (but its true it would be much easier with js) nor how to switch to radioboxes. If you know what should I do please give me a hint. I'll ask similar question on Hobo group. Best regards, Piotr On 15 Lut, 17:08, Colin Law <clan...@googlemail.com> wrote: > > Validation is not on form fields but on data about to be saved to the > database. Do you have two columns in the table, one for each > checkbox? If so, and only one of them should be selected then reduce > it to a single column. As far as the form is concerned you may be > better with a radio box as Amador has suggested. If you need them to > be checkboxes you could use javascript to clear one when the other is > selected. > > Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.