Recommend this page to a friend! |
All requests | > | HTML forms from XML document with PHP | > | Request new recommendation | > | Featured requests | > | No recommendations |
by Karlis - 8 years ago (2016-05-19)
+2 | I need to parse XML document using PHP parse functions and create HTML form from it. |
1. by Manuel Lemos - 8 years ago (2016-05-23) Reply
What kind of XML document is that? Can you show a sample?
2. by Karlis - 8 years ago (2016-05-23) in reply to comment 1 by Manuel Lemos Comment
<?xml version="1.0" encoding="UTF-8"?> <forms>
<form>
<name>test</name>
<field>
<name>Field1</name>
<text>First field</text>
<value>Default value 1</value>
<size />
</field>
<field>
<name>Field2</name>
<text>Another field</text>
<value>Its value</value>
<size>50</size>
</field>
<field>
<name>check1a</name>
<type>Checkbox</type>
<text>A check box a</text>
<value>1</value>
<checked>1</checked>
</field>
</form>
<form>
<name>form two</name>
<field>
<name>TwoField1</name>
<text>Two field</text>
<value>Two Default value 1</value>
</field>
<field>
<name>TwoField2</name>
<text>Two Another field</text>
<value>Two Its value</value>
<size>20</size>
</field>
<field>
<name>ta1</name>
<id>ta1</id>
<type>textarea</type>
<rows>15</rows>
<cols>60</cols>
<value>This is a text area</value>
<text>Notes<br></text>
</field>
<field>
<name>radio1</name>
<type>radio</type>
<text>Box 1</text>
<value>1</value>
<checked>1</checked>
</field>
<field>
<name>radio1</name>
<text>Box 2</text>
<type>radio</type>
<value>2</value>
</field>
<field>
<name>check1</name>
<type>Checkbox</type>
<text>A check box</text>
<value>1</value>
</field>
</form>
</forms>
3. by Manuel Lemos - 8 years ago (2016-05-23) in reply to comment 2 by Karlis Comment
I have a package to parse XML documents easily and another to generate and validate forms. If that is what you want I can suggest that you use them together. Just let me know.
4. by Karlis - 8 years ago (2016-05-24) in reply to comment 3 by Manuel Lemos Comment
I just need to generate and validate forms from XML document.
5. by Karlis - 8 years ago (2016-05-24) in reply to comment 4 by Karlis Comment
Last time I create a web page where I insert xml and as a result is generated html form. That time it was xslt tranformations.
Could You make it like web page where I can insert that xml structure and from it will generates html form?
0 | by Fabio Pintore 130 - 6 years ago (2017-11-13) Comment I hope this package help you !! There are many component for realize form, but you can create your owns easily. Try it !! Enjoy |
0 | by Manuel Lemos 23960 - 8 years ago (2016-05-24) Comment This class that parse arbitrary XML documents and returns a structured array that would be easy to process and generate forms with the PHP forms generation and validation class. Using both classes together you have a solution for your problem. |
1. by Manuel Lemos Reply
- 8 years ago (2016-05-24)There is a tutorial article here explaining how to use the XML parser class to parse a XML document with a single call.
2. by LUCIANO SEIBEL - 8 years ago (2016-05-25) in reply to comment 1 by Manuel Lemos Reply
WOW ... tks Manuel ... Is there what I looking for at this week!
3. by Manuel Lemos Reply
- 8 years ago (2016-05-25) in reply to comment 2 by LUCIANO SEIBELGood to know. Now makeing the output of XML class be passed to the forms class should be easy.
Recommend package | |
|