just for completeness, the css I was talking about can be exemplified
by the cookbook recipe edit body box.

form.recipe textarea.recipe-body { ... }

class = Recipe
field = body

form class => recipe
field class => form class-fieldname => recipe-body

On Jul 27, 2:29 pm, kevinpfromnm <[email protected]> wrote:
> Usually, you want a form to be the same in both new and edit.  If
> that's the case, you should override the form tag for the model in
> your application.dryml file...
>
> <extend tag="form" for="ModelClassYesInTitlecase">
>   <old-form merge>
>     <field-list:>
>       <note-view:>
>         <new input tag here />
>       </note-view:> # etc. close rest of tags
>
> though, it actually looks like you only want to change the styling of
> the text area.  there is enough class names to be able to uniquely
> target the text area input for that and change the size without having
> to override any part of the tags.
>
> also, you can't mix parameter calls (<note-tag:> for instance) with
> non, <field-list ... />.  dryml would not know where to put what in
> other words.
>
> On Jul 27, 2:08 pm, Skott Klebe <[email protected]> wrote:
>
> > OK, I simply must get this to work> In any case, if you just want to swap 
> > out one field's tag in a list,
> > > you could do this (assume the field is called special_field):
>
> > > <field-list fields="...">
> > >  <special-field-tag:>
> > >    <input for-type="text" />
> > >  </special-field-tag:>
> > > </field-list>
>
> > The field is called note, so those lines of code should look like this
> > for me, right?
>
> >           <field-list fields="name, note"/>
> >           <note-tag:>
> >             <input for-type="text" cols="80" rows="4"/>
> >           </note-tag:>
>
> > In my app, I've created edit.dryml in the appropriate views
> > subdirectory, and copied the generated form out of forms.dryml into it
> > as follows:
>
> >  <edit-page>
> >     <content-body:>
>
> >       <form>
> >         <error-messages />
> >           <field-list fields="name, note, cre_usr, upd_usr, dist_type"/>
> >           <note-tag:>
> >             <input for-type="text" cols="80" rows="4"/>/>
> >           </note-tag:>
>
> >           <div >
> >             <submit label="#{ht 'dists.actions.save', :default=>['Save']}" 
> > />
> >             <or-cancel/>
> >           </div>
> >       </form>
> >     </content-body:>
> >  </edit-page>
>
> > First of all, this clearly isn't very DRY, but it's what I think that
> > the Agility tutorial tells me to do in the paragraphs where it
> > discusses filling in the content-body: parameter.
>
> > Second, it doesn't work.
>
> > >mixed parameter tags and non-parameter tags (did you forget a ':'?) -- at 
> > >app/views/dists/edit.dryml:4
> > >Extracted source (around line #4):
>
> > >1:  <edit-page>
> > >2:     <content-body:>
> > >3:
> > >4:       <form>
> > >5:         <error-messages />
> > >6:           <field-list fields="name, note"/>
> > >7:           <note-tag:>
>
> > So I don't think that I was executing your suggestion properly.  What
> > am I doing wrong?
>
> > SK
> > --
> > Skott Klebe
> > [email protected]
>
>

-- 
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