CSS forms

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

CSS forms

byersa
I know there has been discussion about this in the  past, but I can't
see a clear answer to my questions from them. I see a need for a simple
ability to create single forms with css styles only. My current need is
to show a horizontal query bar with drop-downs that send a query to the
server. In this case I do not want any titles to show. I looked at using
the position attribute to do this, but the table format screws things
up. I also want to be able to take advantage of other widget special
features, such as lookup or dates, without having tables involved.

I was just thinking of creating a new form type, "css", that cycles thru
the fields and does not do anything with tables and ignores the title if
it is empty.

Is this too simplistic? A bad idea? Won't be difficult to put together.

-Al

Reply | Threaded
Open this post in threaded view
|

Re: CSS forms

Leon Torres-2
Hi Al,

I created some pure-css forms with no tables involved for the CRMSFA application
(writeEmail.ftl and viewEmail.ftl).  My experience with that is CSS as currently
implemented isn't suitable for doing this kind of thing.  Column layouts are
still a pain, so css can't be considered a replacement for tables quite yet (see
the Slashdot interview with Hakon today).  You need absolute positioning for it
to work, and floats are just a pita to get right.

But we're thinking about restructuring the DOM of the form html renderer to give
Ajax and CSS people something easier to work with.  This is probably as simple
as giving each table a unique id = form name.  Then you can use CSS selectors to
make your form richer.

- Leon



Al Byers wrote:

> I know there has been discussion about this in the  past, but I can't
> see a clear answer to my questions from them. I see a need for a simple
> ability to create single forms with css styles only. My current need is
> to show a horizontal query bar with drop-downs that send a query to the
> server. In this case I do not want any titles to show. I looked at using
> the position attribute to do this, but the table format screws things
> up. I also want to be able to take advantage of other widget special
> features, such as lookup or dates, without having tables involved.
>
> I was just thinking of creating a new form type, "css", that cycles thru
> the fields and does not do anything with tables and ignores the title if
> it is empty.
>
> Is this too simplistic? A bad idea? Won't be difficult to put together.
>
> -Al
>

Reply | Threaded
Open this post in threaded view
|

Re: CSS forms

Andrew Sykes
In reply to this post by byersa
Given the recent discussions about beautifying OFBiz, adding AJAX etc,
perhaps this is "generally" a better approach...

- Andrew

On Fri, 2006-06-23 at 10:04 -0600, Al Byers wrote:

> I know there has been discussion about this in the  past, but I can't
> see a clear answer to my questions from them. I see a need for a simple
> ability to create single forms with css styles only. My current need is
> to show a horizontal query bar with drop-downs that send a query to the
> server. In this case I do not want any titles to show. I looked at using
> the position attribute to do this, but the table format screws things
> up. I also want to be able to take advantage of other widget special
> features, such as lookup or dates, without having tables involved.
>
> I was just thinking of creating a new form type, "css", that cycles thru
> the fields and does not do anything with tables and ignores the title if
> it is empty.
>
> Is this too simplistic? A bad idea? Won't be difficult to put together.
>
> -Al
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com


Reply | Threaded
Open this post in threaded view
|

Re: CSS forms

David E. Jones
In reply to this post by byersa

I may be out of my mind here... but this sounds like a great case for using an FTL file instead of a form widget. It sounds like it is minimally data driven and mostly oriented to a custom UI. A horizontal bar of fields is not something that has come up enough for me to be comfortable with an abstraction for it going into the form widget. Even if we were to put something like that in the form widget I'd really like to see a number of manually done cases for the functionality to cover before even _thinking_ about an addition.

There is some messy stuff in there that probably would have been cleaner if this approach was used more, and at this point where stability in the framework is becoming more important, having good background study before adding to the form widget or any other tool is important. If it seems to be a matter of convenience to implement it in the form widget so you don't have to manually create the HTML then that may be a good sign of a cart before the horse and stepping back for a wider view might be a good idea.

Some of the things you mentioned, like lookup windows and the date/time popup, partially predate the form widget and are very easy to use without it (ie to just pop into an FTL file).

-David


Al Byers wrote:

> I know there has been discussion about this in the  past, but I can't
> see a clear answer to my questions from them. I see a need for a simple
> ability to create single forms with css styles only. My current need is
> to show a horizontal query bar with drop-downs that send a query to the
> server. In this case I do not want any titles to show. I looked at using
> the position attribute to do this, but the table format screws things
> up. I also want to be able to take advantage of other widget special
> features, such as lookup or dates, without having tables involved.
>
> I was just thinking of creating a new form type, "css", that cycles thru
> the fields and does not do anything with tables and ignores the title if
> it is empty.
>
> Is this too simplistic? A bad idea? Won't be difficult to put together.
>
> -Al

Reply | Threaded
Open this post in threaded view
|

Re: CSS forms

David E. Jones
In reply to this post by Leon Torres-2

For list and multi type forms I agree that we'll probably never move away from a table based layout, they are tabular in nature after all.

For single forms I did some POC work on this and it can be seen in the newcustomer.ftl file in ecommerce. The main classes used there called form-row, form-label, and form-field. This seems to work fairly well actually.

-David


Leon Torres wrote:

> Hi Al,
>
> I created some pure-css forms with no tables involved for the CRMSFA
> application (writeEmail.ftl and viewEmail.ftl).  My experience with that
> is CSS as currently implemented isn't suitable for doing this kind of
> thing.  Column layouts are still a pain, so css can't be considered a
> replacement for tables quite yet (see the Slashdot interview with Hakon
> today).  You need absolute positioning for it to work, and floats are
> just a pita to get right.
>
> But we're thinking about restructuring the DOM of the form html renderer
> to give Ajax and CSS people something easier to work with.  This is
> probably as simple as giving each table a unique id = form name.  Then
> you can use CSS selectors to make your form richer.
>
> - Leon
>
>
>
> Al Byers wrote:
>> I know there has been discussion about this in the  past, but I can't
>> see a clear answer to my questions from them. I see a need for a
>> simple ability to create single forms with css styles only. My current
>> need is to show a horizontal query bar with drop-downs that send a
>> query to the server. In this case I do not want any titles to show. I
>> looked at using the position attribute to do this, but the table
>> format screws things up. I also want to be able to take advantage of
>> other widget special features, such as lookup or dates, without having
>> tables involved.
>>
>> I was just thinking of creating a new form type, "css", that cycles
>> thru the fields and does not do anything with tables and ignores the
>> title if it is empty.
>>
>> Is this too simplistic? A bad idea? Won't be difficult to put together.
>>
>> -Al
>>

Reply | Threaded
Open this post in threaded view
|

Re: CSS forms

byersa
I had it done as an ftl file and that is how I will do it. At the time,
it struck me as a useful thing, but since the consensus is that it is
not, I won't bother. Thanks for the tips and input.

-Al

David E. Jones wrote:

>
> For list and multi type forms I agree that we'll probably never move
> away from a table based layout, they are tabular in nature after all.
>
> For single forms I did some POC work on this and it can be seen in the
> newcustomer.ftl file in ecommerce. The main classes used there called
> form-row, form-label, and form-field. This seems to work fairly well
> actually.
>
> -David
>
>
> Leon Torres wrote:
>> Hi Al,
>>
>> I created some pure-css forms with no tables involved for the CRMSFA
>> application (writeEmail.ftl and viewEmail.ftl).  My experience with
>> that is CSS as currently implemented isn't suitable for doing this
>> kind of thing.  Column layouts are still a pain, so css can't be
>> considered a replacement for tables quite yet (see the Slashdot
>> interview with Hakon today).  You need absolute positioning for it to
>> work, and floats are just a pita to get right.
>>
>> But we're thinking about restructuring the DOM of the form html
>> renderer to give Ajax and CSS people something easier to work with.  
>> This is probably as simple as giving each table a unique id = form
>> name.  Then you can use CSS selectors to make your form richer.
>>
>> - Leon
>>
>>
>>
>> Al Byers wrote:
>>> I know there has been discussion about this in the  past, but I
>>> can't see a clear answer to my questions from them. I see a need for
>>> a simple ability to create single forms with css styles only. My
>>> current need is to show a horizontal query bar with drop-downs that
>>> send a query to the server. In this case I do not want any titles to
>>> show. I looked at using the position attribute to do this, but the
>>> table format screws things up. I also want to be able to take
>>> advantage of other widget special features, such as lookup or dates,
>>> without having tables involved.
>>>
>>> I was just thinking of creating a new form type, "css", that cycles
>>> thru the fields and does not do anything with tables and ignores the
>>> title if it is empty.
>>>
>>> Is this too simplistic? A bad idea? Won't be difficult to put together.
>>>
>>> -Al
>>>
>


Reply | Threaded
Open this post in threaded view
|

Re: CSS forms

David E. Jones

Actually, reading the description again: this seems somewhat like a Menu Widget type of thing... Kind of like a menu with lots of options in various drop-downs. Am I reading that correct? If so this might be a good addition to the Menu Widget, though it seems a little far out for the Form Widget.

-David


Al Byers wrote:

> I had it done as an ftl file and that is how I will do it. At the time,
> it struck me as a useful thing, but since the consensus is that it is
> not, I won't bother. Thanks for the tips and input.
>
> -Al
>
> David E. Jones wrote:
>>
>> For list and multi type forms I agree that we'll probably never move
>> away from a table based layout, they are tabular in nature after all.
>>
>> For single forms I did some POC work on this and it can be seen in the
>> newcustomer.ftl file in ecommerce. The main classes used there called
>> form-row, form-label, and form-field. This seems to work fairly well
>> actually.
>>
>> -David
>>
>>
>> Leon Torres wrote:
>>> Hi Al,
>>>
>>> I created some pure-css forms with no tables involved for the CRMSFA
>>> application (writeEmail.ftl and viewEmail.ftl).  My experience with
>>> that is CSS as currently implemented isn't suitable for doing this
>>> kind of thing.  Column layouts are still a pain, so css can't be
>>> considered a replacement for tables quite yet (see the Slashdot
>>> interview with Hakon today).  You need absolute positioning for it to
>>> work, and floats are just a pita to get right.
>>>
>>> But we're thinking about restructuring the DOM of the form html
>>> renderer to give Ajax and CSS people something easier to work with.  
>>> This is probably as simple as giving each table a unique id = form
>>> name.  Then you can use CSS selectors to make your form richer.
>>>
>>> - Leon
>>>
>>>
>>>
>>> Al Byers wrote:
>>>> I know there has been discussion about this in the  past, but I
>>>> can't see a clear answer to my questions from them. I see a need for
>>>> a simple ability to create single forms with css styles only. My
>>>> current need is to show a horizontal query bar with drop-downs that
>>>> send a query to the server. In this case I do not want any titles to
>>>> show. I looked at using the position attribute to do this, but the
>>>> table format screws things up. I also want to be able to take
>>>> advantage of other widget special features, such as lookup or dates,
>>>> without having tables involved.
>>>>
>>>> I was just thinking of creating a new form type, "css", that cycles
>>>> thru the fields and does not do anything with tables and ignores the
>>>> title if it is empty.
>>>>
>>>> Is this too simplistic? A bad idea? Won't be difficult to put together.
>>>>
>>>> -Al
>>>>
>>
>