Best way to remove certain values from a cloned record
Best way to remove certain values from a cloned record
Was able to add a button to clone a record using the datatables example
https://editor.datatables.net/examples/api/duplicateButton.html
In my application I would like to change certain values to null to force the user to enter certain fields after the record is cloned. Any suggestions?
GEH
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Was able to set the value of the field using the field name.
Modified the sample new entry to read in my case:
editor
.create( {
title: 'Clone an existing record' ,
buttons: 'Create from existing'
} )
.set( values )
.field ( 'chemical_inv.ppe_requirements' ).val ( '' );
Thanks much, great product.
Hi,
That looks like it is probably the best way to me. The other option would be to remove the
chemical_inv.ppe_requirements
from thevalues
object by deleting it before callingset()
:Allan