Jump to content
Sign in to follow this  

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...



Share this post

Link to post
Share on other sites

It looks like your XSL works. Are you asking how to do this with PHP?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...