Datatables editor - How can i have two different forms for New & Edit options?

Datatables editor - How can i have two different forms for New & Edit options?

gfong007gfong007 Posts: 7Questions: 3Answers: 0

Lets say my row has columns - A,B,C,D,E. When 'adding' a new row all five columns should be available on form. But once the row is added to the table, I want to disable editing on first three columns. So the 'Edit' Form should only show columns 'D' and 'E'.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Answer ✓

    There are two options:

    1. Use the show() and hide() methods in combination with initCreate and initEdit to show and hide the fields as you need.
    2. Create two different Editor instances, one for the create with all five fields, and one for edit with just the two required.

    Regards,
    Allan

This discussion has been closed.