On Apr 25, 2011, at 2:38 PM, Tuishimi wrote:

> Matt, that worked (as far as hitting submit and all) but now my error
> messages (required field) isn't showing up?  I have left edit and
> update as hobo-automatic generated controller actions.  I have only
> overridden the "edit.dryml" page itself.
> 
> It comes back to my page, but the error message "XXXX is a required
> field (or whatever the standard message is)" is not showing up.   I am
> sure it has something to do with my non-standard machinations.

When you override the form, do you do it by replacing the field-list, or by 
explicitly opening the form tag? These two bits of code will yield somewhat 
different behavior:

<page>
  <content:>
    <form>
      <field-list: replace>
...

(the above should still show error messages) vs:

<page>
  <content:>
    <form>
       ...moar DRYML...

the former leaves the other params alone, while the latter tells the form tag, 
"nevermind any of that, here's the content to use". You'll notice a difference 
if you pull up a form from app/views/taglibs/auto/forms.dryml, which will have 
tags resembling:

<def tag="form" for="Channel">
  <form merge param="default">
    <error-messages param/>
    <field-list fields="name, feed_assignments, users" param/>
    <div param="actions">
      <submit label="#{ht 'channels.actions.save', :default=>['Save']}" 
param/><or-cancel param="cancel"/>
    </div>
  </form>
</def>

I suspect, based on the observed behavior, that you're using the *second* 
format; if that's the case, you should just need to add:

<error-messages />

inside the form tag to get the standard behavior back.

--Matt Jones


  

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to