bID not available until first block save
Permalink
I need to attach a new bID to my block before it gets saved, how can I do this?
It doesn't exist before that. Save creates the bID through the database auto-incrementing the field since the previous (any) block save.
To attach a unique identifier before the block is even saved, my solution involved generating a random string from the add() method and passing it to the block form, which then gets saved to the db.
I don't think it's possible to get before that.