Jump to content

new to xml... are dynamic forms possible


Recommended Posts

Hi. My goal is to have a form that updates an xml.file...


Can I create a form that would automatically know what the field names are? For instance the hardware engineers I work with don't even close to html forms and php so they want to be able to just change a node name or even add and subtract nodes, however they don't want to touch the code for the form/


The hardware engineer that gave me this task call it... Self Defining Entry Fields


Anyone ever hear of that? Here are my xml and xsl sheet....


It's kinda like the xsl


<xsl:template match="/">
<form method="post" action="test.php">
<h2>Customer Information:</h2>
<table border="0">
<xsl:for-each select="/customer/location/field">
<td><xsl:value-of select="@id"/></td>
<input type="text" size="50">
<xsl:attribute name="id">
<xsl:value-of select="@id" />
<xsl:attribute name="name">
<xsl:value-of select="@id" />
<xsl:attribute name="value">
<xsl:value-of select="value" />
The xml looks like this
<field id="Name " name="name "> <value>MHV </value> </field>
<field id="City " name="city "> <value>Lake Katrine </value> </field>
<field id="State " name="state "> <value>NY </value> </field>
<field id="ZIP " name="zip "> <value>12449 </value> </field>
<field id="Email Addresses" name="email_addresses"> <value>hupcey@cadence.com berghorn@cadence.com </value> </field>
If you notice the xsl does not need the field names, Just the child node location.
How can I make this work the same way with an html form? Thank you...



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...