Duplicating records?

16 posts by 7 authors in: Forums > CMS Builder
Last Post: December 20, 2011   (RSS)

By blukabm - August 19, 2008

I am curious if there is currently a way to duplicate a record. That way I could modify the copied record instead of creating a new one and re-entering data that won't change much.

Thanks!

Re: [blukabm] Duplicating records?

By Dave - August 19, 2008

There's currently no automatic way to do that.

Another approach might be to set the default values for the fields in the field editor so when you create a new record it starts with those values.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Duplicating records?

By blukabm - August 20, 2008

Is that something that could be added through the custom programming option? If so, we may look into that.

Thanks!

Re: [blukabm] Duplicating records?

By Dave - August 20, 2008

Hi blukabm,

It can (as we're discussing over email) - another option might be to try and find a bookmarklet tool that would let you save the form data and re-output it.

I did a google search for "copy form values bookmarklet"
http://www.google.com/search?q=copy+form+values+bookmarklet

and found this site:
http://www.benjaminkeen.com/software/bookmarklet_generator/

I don't know if that will do exactly what you need or not but I thought it might be worth a look.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Duplicating records?

Talk about perfect timing! I just had a client who asked for this capability so I tried this and it works great!

Thanks Dave!

Kevin

Re: [kevbarker] Duplicating records?

By sublmnl - February 21, 2011 - edited: February 21, 2011

<div style="float:right">
<input type="submit"
name="action=save"
value="<?php et('Save As Copy') ?>"
onclick="document.getElementById('num').value=''; document.getElementById('preSaveTempId').value='1234567890abc'"
class="button" />

<?php
$buttonsRight = '';
$buttonsRight .= "<input class='button' type='submit' name='_action=save' value='" .t('Save'). "' />\n";
if ($previewUrl) {
$buttonsRight .= "<input class='button' type='button' name='preview' value='" .t('Preview'). "' onclick=\"editPreview();\" />\n";
}
$buttonsRight .= "<input class='button' type='button' name='cancel' value='" .t('Cancel'). "' onclick=\"editCancel();\" />\n";
$buttonsRight = applyFilters('edit_buttonsRight', $buttonsRight, $tableName, $GLOBALS['RECORD']);
echo $buttonsRight;
?>
</div>


This kind of works.
Perhaps its the newer version of CMSB. I noticed that your code is a little different than the above which is what I have.
I have to make the image upload field not required in order to make a copy.
Dave can you update this?

THanks

Re: [sublmnl] Duplicating records?

By Jason - February 22, 2011

Hi,

We have a user submitted plugin that creates the "Save & Copy" button and functionality for you:

http://www.interactivetools.com/add-ons/detail.php?Save-Copy-Button-1030

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Duplicating records?

Thanks Jason, and that looks familiar...
And I remember why I couldn't use it.
Until I found this post today.



thanks!

Re: [sublmnl] Duplicating records?

Would be great is this also added a "Duplicate" link in the list view, next to View | Modify | Erase

:)