Very good patch for tableless forms @Thadeus, I think it's a must for 
web2py to be tableless for at least to accomplish AA accesibility w3c.
Alex F

El 15/12/2009 0:00, Thadeus Burgess escribió:
> Take, for example:  http://jeffhowden.com/code/css/forms/
>
> With a form design as such, you can turn it easily into
>
> http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx
>
> A custom patch seems to be the most appropriate. Create a list, that
> represents the form, and use a function to chop through it.
>
> I am playing around with the following
>
> http://pastebin.com/m764d7a39
>
> Basically, it takes a list of lists, each sublist is a fieldset where
> if a element is a list it is the fieldset title, and if it is a tuple,
> it goes into the notes div.
>
> It formats the form and looks "almost" exactly like the one on the
> first link (with the appropriate css. Then using the formtowizard, it
> looks nice :)
>
> I am actually happier with this, since I believe allows for the most
> customization as far as form content goes.
>
> SQLFORM does need to be refactored into more MVC format.... I am
> thinking of SQLFORM only making the data ready, and performing the
> validation, and have a separate class that creates and renders the
> form elements.
>
> -Thadeus
>
>
>
>
>
> On Mon, Dec 14, 2009 at 4:20 PM, DenesL<denes1...@yahoo.ca>  wrote:
>    
>> Many moons have passed since I last looked at this but if I remember
>> correctly I went for a class that was based on SQLFORM (currently
>> sitting in the back burner).
>>
>> SQLFORM mixes processing and presentation very tightly, which is fine
>> for starters but you soon get to a point where you want to keep the
>> processing but have a completely different presentation.
>>
>> My initial approach was the 'custom form' patch which is fine but
>> somewhat cumbersome.
>> The lastest is CSS based and it would allow easy form customization if
>> I can iron out some pending issues. I would love to hear your ideas,
>> specially about CSS.
>>
>> Denes.
>>
>>
>> On Dec 14, 12:51 pm, Thadeus Burgess<thade...@thadeusb.com>  wrote:
>>      
>>> I would like to accomplish the output of the below, but use SQLFORM,
>>> and not mess with sqlform.custom.
>>>
>>> form = FORM(
>>>          FIELDSET(
>>>              LEGEND("Your Information"),
>>>              LABEL("Name:", _for="name"),
>>>              INPUT(_name="name"),
>>>              LABEL("Email:", _for="email"),
>>>              INPUT(_name="email"),
>>>              LABEL("Country:", _for="country"),
>>>              INPUT(_name="country"),
>>>          ),
>>>          FIELDSET(
>>>              LEGEND("Account Info"),
>>>              LABEL("Username:", _for="username"),
>>>              INPUT(_name="username"),
>>>              LABEL("Password:", _for="password"),
>>>              INPUT(_name="password"),
>>>              LABEL("Password Again:", _for="passwordrpt"),
>>>              INPUT(_name="passwordrpt"),
>>>          ),
>>>      )
>>>
>>> I am thinking an interface that allows mixing and matching of DIV
>>> based objects and fields.
>>> Should I a new form class be created, or a class that uses an existing
>>> forms sqlform.custom?
>>>
>>> Does anyone have any ideas on the best way to implement the functionality?
>>>
>>> SQLFORM.factory(
>>>             FIELDSET(
>>>                 LEGEND("Your Information"),
>>>                 db.accounts.name,
>>>                 db.accounts.email,
>>>                 db.accounts.country,
>>>            ), FIELDSET(
>>>                 LEGEND("Account Info"),
>>>                 db.accounts.username,
>>>                 db.accounts.password,
>>>                 db.accounts.passwordrpt,
>>>           ),
>>> )
>>>
>>> Also on a side note, You can get the same functionality of forms (the
>>> table like layout) with pure CSS. I keep wondering why a TABLE was
>>> chosen for default forms, since it makes it impossible to style the
>>> form **layout** with CSS.
>>>
>>> -Thadeus
>>>        
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>>
>>      
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>    

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to