add a blank row on ctrl+b

add a blank row on ctrl+b

marcusa007marcusa007 Posts: 26Questions: 4Answers: 0
edited October 2016 in Free community support

I am able to add a blank line to the top of the table when I use the new button and hit create without entering any data.
I would like to do the same thing without having to switch to the mouse and click to open up the new form by using a key combination like ctrl+b. I have tried using addRow() but wasn't successful.

I have an ID row that I have set to hidden and in my field_model id is set->(false) which I think was causing the error 'DataTables warning: table id=raw - Requested unknown parameter 'vendor_billing.billing_id' for row 0, column 0`.

Is it possible to insert a new row without this function having to set the id field? My is set automatically in the DB.

Thanks.

Replies

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    If you have the button working for this, then you could just use Button's keyboard activation.

    Allan

  • marcusa007marcusa007 Posts: 26Questions: 4Answers: 0

    Is there a way to skip past the pop up form and initiate the create from the table view directly?

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    Sure - use the create() method in a custom button and then just submit it without any user interaction.

    Allan

  • marcusa007marcusa007 Posts: 26Questions: 4Answers: 0

    Thanks for all the help, that should work :)

This discussion has been closed.