Duplicator documentation

Duplicator duplicates an element (and all its children) and pastes the duplicate below the original. This is very useful when offering website users the ability to add, for example, extra form fields. Duplicator will also increment numbers in the source element if they are prepended by "_" or wrapped in "[" and "]". For example, the text "element_1" will become "element_2", and the text "number[1]" will become "number[2]" on duplication.

Example

Duplicate the text

<div id="duplicatortarget">
	<p id="duplicatorsource_1" class="duplicator_1">
		<label for="duplicator_1">Field [1]</label></p>
		<input type="text" name="duplicator_1" id="duplicator_1" />
	</p>
</div>
<p>
	<a href="#" class="duplicator targetElement-duplicatortarget sourceElement-duplicatorsource_1 countElement-items">Duplicate the text</a></p>
	<input type="hidden" name="items" id="items" value="1" />
</p>

Settings

Valid elements

a elements (links)

Classname

duplicator

Attributes

None

CSS parameters (what's this?)

sourceElement
The id of the element you wish to duplicate
targetElement
The id of the element in which you wish to paste the duplicated HTML