Add custom button only in add form
Add custom button only in add form
Hi again !
Is it possible to add a custom button only in the add form ?
Example :
When I create a new entry, I want that user could generate a barcode when hits a button next to the barcode field. When he hits, on server side it loads last barcode from the datatbase and and generate the next barcode.
Thanks.
Is it possible to add a custom button only in the add form ?
Example :
When I create a new entry, I want that user could generate a barcode when hits a button next to the barcode field. When he hits, on server side it loads last barcode from the datatbase and and generate the next barcode.
Thanks.
This discussion has been closed.
Replies
1. Use the show and hide methods ( http://editor.datatables.net/api/#show ) to add and remove the fields visually (but they will still be submitted).
2. Use the add and clear methods ( http://editor.datatables.net/api/#add ) to dynamically add and remove the field if you don't want it to be submitted.
You'd use events such as `onInitEdit` to know when to perform this actions.
A third option is to use a different Editor instance for each button.
Allan