On page load, if no data launch the new entry form or button?

On page load, if no data launch the new entry form or button?

bfarkasbfarkas Posts: 181Questions: 48Answers: 0

Anyone ever done a setup where when you get to the page, if there is no data in the table already, it automatically launches the new form or similar via a button?

Answers

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    nevermind, did a quick data check, if rows were 0 then action:

    $(document).ready(function() {
        if (p200table.data().length == "0") {
        p200table.button( '6-0' ).trigger();
        }
        });
    
This discussion has been closed.