473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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

Feb 25 '07 #1
4 2304
Andrew Taylor wrote:
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.
js*******@attglobal.net
==================
Feb 25 '07 #2
Jerry Stuckle wrote:
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!
Feb 25 '07 #3
Hello,

on 02/25/2007 07:48 AM Andrew Taylor said the following:
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/
Mar 4 '07 #4
On Mar 4, 12:46 pm, Manuel Lemos <mle...@acm.orgwrote:
Hello,

on 02/25/2007 07:48 AM Andrew Taylor said the following:
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 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

Mar 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jonathan | last post by:
Does anyone know if it's possible to do the following: I currently have an XML schema set up, part of which includes an enumerated datatype (based on string) giving a list of values that I want...
7
by: Ed Lai | last post by:
A few weeks ago I have the idea of converting XML instance data to a HTML form, using tags as the label and the resulting form can be used to edit the XML data. So I started to play around with it,...
2
by: donaldevans_net | last post by:
I have a site that works well with others browsers. I'm getting complaints about IE5.2.3 that my layers are over lapping. I used XFORMS in my programming can you help me?
0
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance...
1
by: Kiran | last post by:
Hi, Can someone tell me the ASP.Net Forms and XForms. And also the advantages and Disadvantages of ASP.Net Forms over XForms. Thanks Kiran
4
by: Sathyaish | last post by:
I am no JavaScript progammer, and unfortunately am having to babysit an old code base that has a lot of JavaScript in it. I have two questions: (1) Can two HTML controls have the same name? It...
28
by: Timothy Larson | last post by:
A couple years ago it seemed like XHTML was the direction of most web markup, a foregone conclusion. Now I return to the scene and I see many here recommending that authors stick to HTML, albeit...
11
by: vfunc | last post by:
I am a bit confused about XML forms, is this similar to web programming languages like PHP and java ? In particular do you use a compiler or special server to view these XML forms pages and can...
1
by: spark86 | last post by:
I currently have an xform where I'm trying to have the user input first and last name and then when it submits it goes to a file with the path first_last.xml. Here is what I have currently: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.