Looking at the gist you created, I see the following problems:
1. You are calling backdrop_get_form('vhb_status_confirm', $node), but you are never returning the form array for rendering. The important bit here is that, if you want to display the form, you MUST return the form array, so that Backdrop can render it
2. Second problem: you are still using backdrop_get_form within an if statement. This will never work. backdrop_get_form returns an array, which will ALWAYS be evaluated as true if you have it inside an if statement. From what you say before, you are trying to check whether the user confirmed or canceled. This can't be done by putting backdrop_get_form inside an if statement.
I still see problem #2 in the second code you posted above.
So, the correct way to do this is:
1. Use backdrop_get_form in the menu callback (as you have in the second posting). But please notice you CAN pass additional parameters as you were doing before.
2. To check if the user confirmed or canceled you must do that in the submit handler. You can't use an if statement in the form builder to check for that. This will never work. The user will confirm or cancel during an additional page request, where the form will be shown to the user, who then will click confirm or cancel, producing a third page request. By then the if statement is far gone.
There are special techniques to pass parameters between page requests, for example, to assure that the submit handler receives the parameters you first sent to the form builder. You must use $form_state to store these parameters. $form_state is PERSISTENT among page requests that deal with the same form.
In a nutshell, this is what it would look like:
https://gist.github.com/argiepiano/c9ac414e3874331f875c7cc057975637
Take a look and let me now if you have any questions.
Looking at the gist you created, I see the following problems:
1. You are calling backdrop_get_form('vhb_status_confirm', $node), but you are never returning the form array for rendering. The important bit here is that, if you want to display the form, you MUST return the form array, so that Backdrop can render it
2. Second problem: you are still using backdrop_get_form within an if statement. This will never work. backdrop_get_form returns an array, which will ALWAYS be evaluated as true if you have it inside an if statement. From what you say before, you are trying to check whether the user confirmed or canceled. This can't be done by putting backdrop_get_form inside an if statement.
I still see problem #2 in the second code you posted above.
So, the correct way to do this is:
1. Use backdrop_get_form in the menu callback (as you have in the second posting). But please notice you CAN pass additional parameters as you were doing before.
2. To check if the user confirmed or canceled you must do that in the submit handler. You can't use an if statement in the form builder to check for that. This will never work. The user will confirm or cancel during an additional page request, where the form will be shown to the user, who then will click confirm or cancel, producing a third page request. By then the if statement is far gone.
There are special techniques to pass parameters between page requests, for example, to assure that the submit handler receives the parameters you first sent to the form builder. You must use $form_state to store these parameters. $form_state is PERSISTENT among page requests that deal with the same form.
In a nutshell, this is what it would look like:
https://gist.github.com/argiepiano/c9ac414e3874331f875c7cc057975637
Take a look and let me now if you have any questions.