[web2py] Re: quick form styling question

2022-09-07 Thread Dave S


On Monday, September 5, 2022 at 11:26:57 PM UTC-7 silvia...@gmail.com wrote:

> What you actually could do is put the class in the  section 
> of the page and overwrite it manually . Give it for example class ".A {
> width: 50% !important; }"
>
>
Thanks.

/dps
 

> snide...@gmail.com schrieb am Dienstag, 6. September 2022 um 13:12:32 
> UTC+7:
>
>> On Saturday, September 3, 2022 at 5:19:42 PM UTC-7 Dave S wrote:
>>
>>> Warning: everything I know about BootStrap (BS4) I've learned from the 
>>> examples, so I Don't Know Much.
>>>
>>>
>> Slightly related question:  what is the best widget for a factory form 
>> field using IS_IN_SET[ .. several strings ...]?  If I leave it default, I 
>> get a pull-down caret on the right, and autocompletion, but no cursor token 
>> to show the field is active.  if I use SQLFORM.widgets.strings.widget, I 
>> get the curson but no pull-down or autocomplete.
>>
>> /dps
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/593b72a9-6d44-4ace-bbbf-32315a6125cbn%40googlegroups.com.


[web2py] Re: quick form styling question

2022-09-05 Thread Silvian Cedru
What you actually could do is put the class in the  section 
of the page and overwrite it manually . Give it for example class ".A {
width: 50% !important; }"

snide...@gmail.com schrieb am Dienstag, 6. September 2022 um 13:12:32 UTC+7:

> On Saturday, September 3, 2022 at 5:19:42 PM UTC-7 Dave S wrote:
>
>> Warning: everything I know about BootStrap (BS4) I've learned from the 
>> examples, so I Don't Know Much.
>>
>>
> Slightly related question:  what is the best widget for a factory form 
> field using IS_IN_SET[ .. several strings ...]?  If I leave it default, I 
> get a pull-down caret on the right, and autocompletion, but no cursor token 
> to show the field is active.  if I use SQLFORM.widgets.strings.widget, I 
> get the curson but no pull-down or autocomplete.
>
> /dps
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bdfab57e-58ed-426b-b9c0-355b0f934d89n%40googlegroups.com.


[web2py] Re: quick form styling question

2022-09-05 Thread Dave S


On Saturday, September 3, 2022 at 5:19:42 PM UTC-7 Dave S wrote:

> Warning: everything I know about BootStrap (BS4) I've learned from the 
> examples, so I Don't Know Much.
>
>
Slightly related question:  what is the best widget for a factory form 
field using IS_IN_SET[ .. several strings ...]?  If I leave it default, I 
get a pull-down caret on the right, and autocompletion, but no cursor token 
to show the field is active.  if I use SQLFORM.widgets.strings.widget, I 
get the curson but no pull-down or autocomplete.

/dps


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/22109881-0965-49d5-8e89-8e7ecbc3dc6an%40googlegroups.com.


[web2py] Re: quick form styling question

2022-09-05 Thread Dave S

On Sunday, September 4, 2022 at 7:51:28 PM UTC-7 silvia...@gmail.com wrote:

> Can you show me a picture how it looks right now and post the css so I 
> have an idea ?
>
>
It's all in-box stuff,  and with SQLFORM.factory() I set  autofocus by 
specifying that in the widget option for the appropriate field.
Field('firstid',
  
requires=[IS_NOT_EMPTY(),IS_INT_IN_RANGE(99900,105000)],
  label = "Need picture IDs to swap",
  widget = lambda f, v: 
SQLFORM.widgets.integer.widget(f, v, _autofocus=True)),

Adding   
   _class = "col-sm-3",
does not change the field appearance, because it doesn't override the 
default class.

Adding 
_style = "width: 50%",
to the field does not change it's appearance,  but moving it to the 
enclosing form definition shrinks the width, but still has two rows stacked.

If I use FORM(), I get the single row picture, but not widgets.

/dps

snide...@gmail.com schrieb am Sonntag, 4. September 2022 um 07:19:42 UTC+7:
>
>> Warning: everything I know about BootStrap (BS4) I've learned from the 
>> examples, so I Don't Know Much.
>>
>> I have a form with 2 integer fields, one with a label, and the other uses 
>> the input ID for a label.  If I use FORM(), the fields come out 
>> appropriately sized for about 6 digits and side by side.  If I use 
>> SQLFORM.factory(), the fields come out 100% of a div with class "col-sm-9", 
>> which is huge.   I like the look of the FORM() results, but I want 
>> autofocus and other support of the factory form.
>>
>> How can I wrestle the latter to look more like the former?  I can change 
>> the width of the whole form (_style = "width:  50%"), but that line doesn't 
>> work in the field itself, and the inputs remain as separate divs.  The 
>> class defaults to "form-horizontal", so I tried setting it to 
>> "form-vertical", but that didn't work ... I was adding a class, not 
>> replacing a class.
>>
>> (And beside,s that raises the question, what are those two classes really 
>> doing?)
>>
>> Thanks for any advice,
>>
>> Dave S
>> /dps
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0fa900dc-9d8c-4e3a-868b-71ac9d9c9177n%40googlegroups.com.


[web2py] Re: quick form styling question

2022-09-04 Thread Silvian Cedru
Can you show me a picture how it looks right now and post the css so I have 
an idea ?

snide...@gmail.com schrieb am Sonntag, 4. September 2022 um 07:19:42 UTC+7:

> Warning: everything I know about BootStrap (BS4) I've learned from the 
> examples, so I Don't Know Much.
>
> I have a form with 2 integer fields, one with a label, and the other uses 
> the input ID for a label.  If I use FORM(), the fields come out 
> appropriately sized for about 6 digits and side by side.  If I use 
> SQLFORM.factory(), the fields come out 100% of a div with class "col-sm-9", 
> which is huge.   I like the look of the FORM() results, but I want 
> autofocus and other support of the factory form.
>
> How can I wrestle the latter to look more like the former?  I can change 
> the width of the whole form (_style = "width:  50%"), but that line doesn't 
> work in the field itself, and the inputs remain as separate divs.  The 
> class defaults to "form-horizontal", so I tried setting it to 
> "form-vertical", but that didn't work ... I was adding a class, not 
> replacing a class.
>
> (And beside,s that raises the question, what are those two classes really 
> doing?)
>
> Thanks for any advice,
>
> Dave S
> /dps
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/90aa6575-605b-47b4-a398-8a6ea206cf0bn%40googlegroups.com.