Friday, November 11, 2011

Re: Info on manipulating layout in CakePHP

For Cake 1.3, refer to this guide on the Form helper:

http://book.cakephp.org/#!/view/1383/Form

You can use the div => false option in nearly every form element.

If you want to place an input and the submit button side by side, I
think you have to make the div surrounding the input field (or as many
as you need) an inline element display: inline; , with a float: left
and the submit button the same. But I'm not an expert in CSS ;)


On 11 Nov., 17:44, "Yves S. Garret" <yoursurrogate...@gmail.com>
wrote:
> Ok, I think this might help me (I hope).  I'll get back to this thread if I
> have questions.
>
> http://book.cakephp.org/view/182/Form
>
> On Fri, Nov 11, 2011 at 11:40 AM, Yves S. Garret <yoursurrogate...@gmail.com
>
> > wrote:
> > Where did you get that?  I'll need to finagle with this thing for a while
> > to get it right.
>
> > What it does now is simply put the input and button one on top of the
> > other (they should be side-by-side).  The links (which I neglected to show
> > in this case) are not on their own line.
>
> > On Fri, Nov 11, 2011 at 11:05 AM, DigitalDude <
> > e.blumsten...@googlemail.com> wrote:
>
> >> Ok assuming you are using cake 1.3 you should use this code:
>
> >> echo $this->Form->submit('Search', array(
> >>     'class' => 'input_style',
> >>    'div' => false
> >> ));
>
> >> On 11 Nov., 16:59, "Yves S. Garret" <yoursurrogate...@gmail.com>
> >> wrote:
> >> > I want to have it right next to the text box.  I tried creating a class
> >> in
> >> > my CSS that would do that, but as you can see, there is another outer
> >> div
> >> > around the previous div.  I'm sure that one can dictate how the outer
> >> div
> >> > is created (if at all), I just don't know where to look in order to make
> >> > that happen.
>
> >> > On Fri, Nov 11, 2011 at 10:51 AM, DigitalDude
> >> > <e.blumsten...@googlemail.com>wrote:
>
> >> > > What exactly is the question here? Do you want to get rid of the
> >> > > submit button or what is your aim?
>
> >> > > Regards
>
> >> > > On 11 Nov., 16:45, "Yves S. Garret" <yoursurrogate...@gmail.com>
> >> > > wrote:
> >> > > > I go this tid-bit and it works.  But I would love to tweek this
> >> layout so
> >> > > > that everything aligns just the way I want to.
>
> >> > > >     echo $this->Form->create("Provider", array('action' =>
> >> > > > 'view_admit_lookup'));
> >> > > >     echo $this->Form->input("last_name", array(
> >> > > >                             'label'  => 'Doctor Last Name',
> >> > > >                             'class'  => 'input_style'));
> >> > > >     echo $this->Form->submit("Search", array(
> >> > > >                              'class' => 'submit_style'));
>
> >> > > > The above generates this code:
>
> >> > > > <div class="input text">
> >> > > > <label for="ProviderLastName">Doctor Last Name</label>
> >> > > > <input id="ProviderLastName" class="input_style" type="text"
> >> > > maxlength="100"
> >> > > >  name="data[Provider][last_name]">
> >> > > > </div>
> >> > > > <div class="submit">
> >> > > > <input class="submit_style" type="submit" value="Search">
> >> > > > </div>
>
> >> > > > The 2nd div I could do without.  Any pointers?  The book doesn't
> >> seem to
> >> > > > have a section dedicated to this, data-mining google for the moment.
>
> >> > > --
> >> > > Our newest site for the community: CakePHP Video Tutorials
> >> > >http://tv.cakephp.org
> >> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> >> > > others with their CakePHP related questions.
>
> >> > > To unsubscribe from this group, send email to
> >> > > cake-php+unsubscribe@googlegroups.com For more options, visit this
> >> group
> >> > > athttp://groups.google.com/group/cake-php
>
> >> --
> >> Our newest site for the community: CakePHP Video Tutorials
> >>http://tv.cakephp.org
> >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> >> others with their CakePHP related questions.
>
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscribe@googlegroups.com For more options, visit this group
> >> athttp://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate