Hi All.

I am having an issue with cloning a form. When I clone an existing
form, only the input tags are cloned. Here is an example"

-- HTML

<form class="hook" action="do/something" method="post"
enctype="multipart/form-data">
<input type="text" name="variable">
<input type="submit">
</form>

<div id="clonehere"></div>

-- JQuery

$('#clonehere').append($('.hook:first').clone(true).html());

-- Result

#clonehere will only get this part of the form
<input type="text" name="variable">
<input type="submit">

What am I doing wrong?

Reply via email to