Connecting Tech Pros Worldwide Help | Site Map

Use of PHP to generate (X)HTML compliant forms from XForms

 
LinkBack Thread Tools Search this Thread
  #1  
Old February 25th, 2007, 09:55 AM
Andrew Taylor
Guest
 
Posts: n/a
Default Use of PHP to generate (X)HTML compliant forms from XForms

I've been struggling for a long time with HTML_Quickform from PEAR. The
concept is ideal, but, the implementation is (IMHO) a bit of a kludge.

As a developer I want a quick and easy way to generate/validate/process
forms without hand hacking HTML, however, I also want it to be easy to
do! The HTML_Quickform method seems to require more work than it should
and whenever you start getting really complicated forms, the hassle
starts to outweigh the benefits.

I know XForm is currently lacking client-side support, but, with the
implemtation of decent XML parsing functions on PHP5 I'm suprised by
the lack of uptake in this area. XForm would be an ideal way of
managing the process, extremely lightweight XML that can be processed
on the server-side and sent as standard HTML to the client. Once the
client-side support picks up then you can just present the original XML
and no-need to re-code your app.

Are there some projects that perhaps I haven't found? I noticed they're
working on HTML_Quickform2 to make up PHP5 compatibility, surely a
better solution would be to push forward with Xforms? Or is it more
policital, I know XForms have been around a while, is there something
stopping them getting the support they need.

Any comments?

Andrew


  #2  
Old February 25th, 2007, 01:35 PM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: Use of PHP to generate (X)HTML compliant forms from XForms

Andrew Taylor wrote:
Quote:
I've been struggling for a long time with HTML_Quickform from PEAR. The
concept is ideal, but, the implementation is (IMHO) a bit of a kludge.
>
As a developer I want a quick and easy way to generate/validate/process
forms without hand hacking HTML, however, I also want it to be easy to
do! The HTML_Quickform method seems to require more work than it should
and whenever you start getting really complicated forms, the hassle
starts to outweigh the benefits.
>
I know XForm is currently lacking client-side support, but, with the
implemtation of decent XML parsing functions on PHP5 I'm suprised by the
lack of uptake in this area. XForm would be an ideal way of managing the
process, extremely lightweight XML that can be processed on the
server-side and sent as standard HTML to the client. Once the
client-side support picks up then you can just present the original XML
and no-need to re-code your app.
>
Are there some projects that perhaps I haven't found? I noticed they're
working on HTML_Quickform2 to make up PHP5 compatibility, surely a
better solution would be to push forward with Xforms? Or is it more
policital, I know XForms have been around a while, is there something
stopping them getting the support they need.
>
Any comments?
>
Andrew
>
Andrew,

I just find it easier to write the HTML code. It isn't that hard, and
it goes pretty quickly. And I have yet to find any form generation
software which gives me the control I need over them (also, I use a lot
of CSS).

Code to do validation doesn't help at all, either - since I use a lot of
classes and do the validation at the class level.

I've tried a couple of generators in the past, and found they take me
almost twice as long to get the same effect as just doing it myself.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #3  
Old February 25th, 2007, 05:15 PM
Toby A Inkster
Guest
 
Posts: n/a
Default Re: Use of PHP to generate (X)HTML compliant forms from XForms

Jerry Stuckle wrote:
Quote:
I just find it easier to write the HTML code. It isn't that hard, and
it goes pretty quickly. And I have yet to find any form generation
software which gives me the control I need over them (also, I use a lot
of CSS).
I'm not a fan of any of the established form generation stuff and am
currently working on my own:

http://svn.sourceforge.net/viewvc/de...ss?view=markup
http://svn.sourceforge.net/viewvc/de...js?view=markup
http://svn.sourceforge.net/viewvc/de...ss?view=markup

Not finished yet, but it's already possible to create some fairly nifty
multi-tabbed forms with it.

I'm working on some proper examples and documentation, which I'll
hopefully have ready by the end of the coming week. Once it's done the
result will be available here:

http://demiblog.org/etc/forms

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
  #4  
Old March 4th, 2007, 06:55 AM
Manuel Lemos
Guest
 
Posts: n/a
Default Re: Use of PHP to generate (X)HTML compliant forms from XForms

Hello,

on 02/25/2007 07:48 AM Andrew Taylor said the following:
Quote:
I've been struggling for a long time with HTML_Quickform from PEAR. The
concept is ideal, but, the implementation is (IMHO) a bit of a kludge.
>
As a developer I want a quick and easy way to generate/validate/process
forms without hand hacking HTML, however, I also want it to be easy to
do! The HTML_Quickform method seems to require more work than it should
and whenever you start getting really complicated forms, the hassle
starts to outweigh the benefits.
>
I know XForm is currently lacking client-side support, but, with the
implemtation of decent XML parsing functions on PHP5 I'm suprised by the
lack of uptake in this area. XForm would be an ideal way of managing the
process, extremely lightweight XML that can be processed on the
server-side and sent as standard HTML to the client. Once the
client-side support picks up then you can just present the original XML
and no-need to re-code your app.
>
Are there some projects that perhaps I haven't found? I noticed they're
working on HTML_Quickform2 to make up PHP5 compatibility, surely a
better solution would be to push forward with Xforms? Or is it more
policital, I know XForms have been around a while, is there something
stopping them getting the support they need.
I don't know aboyt Quickform class because I don't use it, but it seems
the problem is that you are not able to customize the form templates.

I use this other class that also has an automatic layout renderer like
quickform, but it lets you customize the input row templates.

The class can also let you render forms with custom HTML templates or
even Smarty templates:

http://www.phpclasses.org/formsgeneration

Take a look at some live examples with source code here:

http://www.meta-language.net/forms-examples.html


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
  #5  
Old March 6th, 2007, 09:25 AM
acsandeep@gmail.com
Guest
 
Posts: n/a
Default Re: Use of PHP to generate (X)HTML compliant forms from XForms

On Mar 4, 12:46 pm, Manuel Lemos <mle...@acm.orgwrote:
Quote:
Hello,
>
on 02/25/2007 07:48 AM Andrew Taylor said the following:
>
>
>
Quote:
I've been struggling for a long time with HTML_Quickform from PEAR. The
concept is ideal, but, the implementation is (IMHO) a bit of a kludge.
>
Quote:
As a developer I want a quick and easy way to generate/validate/process
forms without hand hacking HTML, however, I also want it to be easy to
do! The HTML_Quickform method seems to require more work than it should
and whenever you start getting really complicated forms, the hassle
starts to outweigh the benefits.
>
Quote:
I know XForm is currently lacking client-side support, but, with the
implemtation of decent XML parsing functions on PHP5 I'm suprised by the
lack of uptake in this area. XForm would be an ideal way of managing the
process, extremely lightweight XML that can be processed on the
server-side and sent as standard HTML to the client. Once the
client-side support picks up then you can just present the original XML
and no-need to re-code your app.
>
Quote:
Are there some projects that perhaps I haven't found? I noticed they're
working on HTML_Quickform2 to make up PHP5 compatibility, surely a
better solution would be to push forward with Xforms? Or is it more
policital, I know XForms have been around a while, is there something
stopping them getting the support they need.
>
I don't know aboyt Quickform class because I don't use it, but it seems
the problem is that you are not able to customize the form templates.
>
I use this other class that also has an automatic layout renderer like
quickform, but it lets you customize the input row templates.
>
The class can also let you render forms with custom HTML templates or
even Smarty templates:
>
http://www.phpclasses.org/formsgeneration
>
Take a look at some live examples with source code here:
>
http://www.meta-language.net/forms-examples.html
>
--
>
Regards,
Manuel Lemos
>
Metastorage - Data object relational mapping layer generatorhttp://www.metastorage.net/
>
PHP Classes - Free ready to use OOP components written in PHPhttp://www.phpclasses.org/
Maybe you can check out the php2go framework(http://
www.php2go.com.br/). It has a nifty form creation method wherein you
can define the fields in XML and combine it with a tpl file and voila
you have a form which includes both server-side and client-side
validation. Not only that it includes lot of useful stuff as well.

I personally use it for medium to big sized projects. For simpler
stuff you can check out the library i created using PEAR classes +
some other good stuff i found on the net and wrapped it around a
controller. Download it from here

http://www.esnips.com/doc/356a32f6-1.../tuxedo-ver0.1

Run the setup file in the setup folder or modify the config.php file
yourself.

Regards
ac sandeep

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.