[Solar-talk] Question about using forms

Raymond Kolbe rkolbe at gmail.com
Tue Nov 20 17:33:38 CST 2007


Do you mean, how can you separate the form elements so that a portion of the
form (e.g. a text field) will show in a cell in the table?

If this is the case, I came across the same problem the other day and came
to the conclusion that (currently) it can not be done. The reason being
because Solar_Form constructs everything and when fetch() is called, pukes
it all out.

Maybe I am wrong and there is a way to do this, but I haven't found a way
yet. I suppose you could extend Solar_View_Helper_Form and create a couple
of methods that return certain elements along the way (e.g.
fetchField($itemToFetch).

Let me know if I am in left field.

Thanks,
Raymond K.

On Nov 20, 2007 2:45 PM, Cruz, Darwin <Darwin.Cruz at gd-ais.com> wrote:

>  In my controller file i've created a from with two elements:
>
>                 $this->invForm= Solar::factory('Solar_Form');
>
>                                 $this->invForm->setElement('user_email',
> array(
>                                         'type'  => 'text',
>                                         'label' => 'Email Address:'
>                                         ));
>
>
>                                 $this->invForm->setElement('process',
> array(
>                                 'type'  => 'submit',
>                                 'label' => 'Action:',
>                                 'value' => 'Save',
>                                         ));
>
> In my corresponding view i have the following to show the form i have
> created:
>
>                 <?php
>                         echo $this->form($this->invForm(user_email));
>                 ?>
>
> In the view both the text box and the submit button are shown.  But i'm
> trying to break those up to be formatted in a table i'm building.
>
> My question is, how can i only show the user_email portion of the form?
>
> Thanks
>
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20071120/d9299280/attachment.html


More information about the Solar-talk mailing list