[Solar-talk] Forms, User roles and access
Kilbride, James P.
James.Kilbride at gd-ais.com
Mon Mar 24 11:58:48 CDT 2008
It depends. Solar_Form outputs a default view based on the order the
elements were added. If you want more control you pull the elements from
the form and embed them into the view. Darwin Cruz has a good example of
how to do that. But you lose some of the automatic generation of error
messages, validation output, and some other nifty things. And it's more
than one line of code while the default form output is a single line.
Depends what you want.
James Kilbride
-----Original Message-----
From: solar-talk-bounces at lists.solarphp.com
[mailto:solar-talk-bounces at lists.solarphp.com] On Behalf Of Robert
Gonzalez
Sent: Monday, March 24, 2008 12:44 PM
To: solar-talk at lists.solarphp.com
Subject: Re: [Solar-talk] Forms, User roles and access
Wouldn't the way the form renders be a decision of the view? I only ask
that because if your application changed views later, and in that view
elements of the form (say buttons, grouped three across) were to be
rendered vertically instead of horizontally, you would have to change
application code to render the way you want.
If the elements of the form are known to the view then the view can
place things where they are supposed to go without futzing with the
controller code or with the form object itself, instead taking the items
the form object gives it and putting those items wherever necessary for
rendering accoring to that view.
Does that make sense or am I just making noise (seriously, because
sometimes I just don't know about myself).
> Solar_Form:
> How can I customize the way the form is build up
> concerning the design? E.g.: I would like to set some
> fields next to each other instead of below.
>
> Tino
--
Robert A. Gonzalez
_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk
More information about the Solar-talk
mailing list