[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread Massimo Di Pierro
Yes.

crud.settings.formstyle='divs'.

Now you can position the divs any way you like with css.

On Feb 16, 5:38 pm, greenpoise  wrote:
> Where is the limit? could I align the textboxes horizontally??
>
> The code above worked did the reisizing!
>
> On Feb 16, 3:02 pm, Massimo Di Pierro 
> wrote:
>
>
>
>
>
>
>
> > On Feb 16, 7:09 am, Massimo Di Pierro 
> > wrote:
>
> > > given...
> > > from=crud.create()
>
> > > you can do
>
> > > form e in form.elements('input[type=text]'): e['size']=50;
>
> > this is in controller (before {{=form}}.
>
> > > or in JS
>
> > > jQuery('input[type=text]').css('width':'50px'):
>
> > This after unless wrapper in $(document).ready({}); in which case
> > before, possibly in header.
>
> > > or better in CSS
>
> > input[type=text] {width: 50px;}
>
> > This can go on header or in the CSS file (without the 

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread greenpoise

Where is the limit? could I align the textboxes horizontally??

The code above worked did the reisizing!











On Feb 16, 3:02 pm, Massimo Di Pierro 
wrote:
> On Feb 16, 7:09 am, Massimo Di Pierro 
> wrote:
>
> > given...
> > from=crud.create()
>
> > you can do
>
> > form e in form.elements('input[type=text]'): e['size']=50;
>
> this is in controller (before {{=form}}.
>
> > or in JS
>
> > jQuery('input[type=text]').css('width':'50px'):
>
> This after unless wrapper in $(document).ready({}); in which case
> before, possibly in header.
>
>
>
> > or better in CSS
>
> input[type=text] {width: 50px;}
>
> This can go on header or in the CSS file (without the 

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread Massimo Di Pierro


On Feb 16, 7:09 am, Massimo Di Pierro 
wrote:
> given...
> from=crud.create()
>
> you can do
>
> form e in form.elements('input[type=text]'): e['size']=50;

this is in controller (before {{=form}}.


> or in JS
>
> jQuery('input[type=text]').css('width':'50px'):

This after unless wrapper in $(document).ready({}); in which case
before, possibly in header.


>
> or better in CSS
>

input[type=text] {width: 50px;}

This can go on header or in the CSS file (without the 

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread greenpoise
Is this before I call {{=form}}




On Feb 16, 5:09 am, Massimo Di Pierro 
wrote:
> given...
> from=crud.create()
>
> you can do
>
> form e in form.elements('input[type=text]'): e['size']=50;
>
> or in JS
>
> jQuery('input[type=text]').css('width':'50px'):
>
> or better in CSS
>
> input[type=text] {width: 50px;}
>
> On Feb 15, 10:59 pm, greenpoise  wrote:
>
>
>
> > Sorry for a possible double post but honestly, I could not find my
> > previous post. I had asked if it was possible to customize CRUD forms?
> > such as the length of the text boxes? if so, how?  I love the
> > simplicity of CRUD and would prefer it over manually creating forms
>
> > THanks


[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread Massimo Di Pierro
given...
from=crud.create()

you can do

form e in form.elements('input[type=text]'): e['size']=50;

or in JS

jQuery('input[type=text]').css('width':'50px'):

or better in CSS

input[type=text] {width: 50px;}

On Feb 15, 10:59 pm, greenpoise  wrote:
> Sorry for a possible double post but honestly, I could not find my
> previous post. I had asked if it was possible to customize CRUD forms?
> such as the length of the text boxes? if so, how?  I love the
> simplicity of CRUD and would prefer it over manually creating forms
>
> THanks