DUPLICATE A RECORD WITHOUT HAVING TO RETYPE THE DATA - Dec 29th, 2018


BLUKABM did, and said, “That way I could modify the copied record instead of creating a new one and re-entering data
that won't change much. “

In Dave’s (unsupported) approach to add a "Save as Copy" button to the bottom left of the edit page he said:

“It doesn't support uploads or all the field types but worked for this case. I'm posting in here in case it turns out
to be useful for someone else as well.”

1. - Create a backup copy of /lib/menus/default/edit.php
2. - Open /lib/menus/default/edit.php
3. - Search for showWysiwygGeneratorCode
4. - Add the new code below(about 15 lines above showWysiwygGeneratorCode)


<table border="0" cellspacing="0" cellpadding="0" width="690">
<tr>
<!-- Insert This Code -->
<td>
<input type="submit" name="action=save" value="<?PHP _e('Save as Copy') ?>"
onclick="document.getElementById('num').value='';
document.getElementById('preSaveTempId').value='1234567890abc'"
class="inputButton" />
</td>
<!-- End of Insert-->
<td align="right">
<input type="submit" name="action=save" value="<?PHP _e('Save') ?>" class="inputButton" />
<input type="button" name="cancel" value="<?PHP _e('Cancel') ?>" class="inputButton"
onclick="window.location='?menu=<?PHP print urlencode($menu) ?>'" />
</td>
</tr>
</table>
</form>

<?PHP showWysiwygGeneratorCode() ?>


This approach was made into a free plugin in November 2010. The plugin adds the functionality of copying the record and
its upload as well. Pretty cool.

You can download the free plugin from:

http://www.interactivetools.com/add-ons/?user_submitted=1



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service