Template Problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

What I have is a form. I want the user to be able to add new form feilds. I
thought the best way to do this would be to use some sort of template

Does anyone have any other suggestions?


Re: Template Problem

[Mystic] wrote:

Quoted text here. Click to load it

Perhaps echoing out the form parts inside individual if() blocks using
the isset() function to govern what fields are shown.  If a user wants
another field, then the page can reload with a new field "set."  For

<form method="post" action="ThisIsHEreForGoodHTML">
<input type="checkbox" name="ShowField_field1" value="true"
onclick="window.location = './scriptname.php'" />
<input type="checkbox" name="ShowField_field2" value="true"
onclick="window.location = './scriptname.php'" />
<!-- Do this as often as needed. -->

<form method="post" action="handlerscript.php">

if(isset($_POST["ShowField_field1"])){echo "<input type="text"
name=\"field1\" value=\"\" size=\"20\" />\r";}
if(isset($_POST["ShowField_field2"])){echo "<input type="text"
name=\"field2\" value=\"\" size=\"20\" />\r";}
// Do this as often as needed.


Scott Orsburn

Kaomso | Information Technology

Site Timeline