Add extra form field

March 30, 2010 at 23:07:21
Specs: Windows 7, 6GB RAM
I have a form, say this:
Title: [text field]
Parameters: [dropdown box]

Simples so far. What I want is to have this:
Title: [text field]
Parameters: [dropdown box]
[button or link]Add another parameter[/button or link]

The button/link has to add another dropdown box beneath the first one.

This would be a lot easier to look up in Google if I new what this was called!!


See More: Add extra form field

Report •


#1
May 22, 2010 at 20:59:33
Perhaps something like this:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">

Title:
<input type="text" name="textfield" />
</p>

Parameters
<select name="select">
</select>
</p>


<select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
<option>Add another parameter</option>
</select>
</p>
</form>
</body>
</html>


Report •

#2
May 23, 2010 at 05:10:34
I've seen a few plugins to do what you're asking, how about this one:

http://code.google.com/p/jquery-asm...

Try the demos:
http://www.ryancramer.com/projects/...
http://www.ryancramer.com/projects/...


Report •

Related Solutions


Ask Question