Page 1 of 2
Run a procedure on button click
Posted: Sat Apr 21, 2018 11:20 pm
by Timo
I created a PHP procedure that uses a Launch Form. How can this procedure be run when clicking on a button in an Edit form? I added a button with a run type but the launch form does not appear when I click on the button.
Re: Run a procedure on button click
Posted: Sun Apr 22, 2018 2:26 am
by admin
Timo,
I need more information.
eg.
-What DOES happen when you click the Button.
-Can you show a screenshot of the Builder Procedure Edit Form.
Steven
Re: Run a procedure on button click
Posted: Sun Apr 22, 2018 6:54 am
by Timo
I added a nuDebug in the PHP, this shows me that the function is called. But the launch form is not shown.
Just saw another topic here:
https://forums.nubuilder.cloud/viewtopic.php?f=21&t=9465. This is about the same issue.
There is just a run button on the edit form that calls the procedure. Should be easy to replicate.
Re: Run a procedure on button click
Posted: Sun Apr 22, 2018 6:56 am
by admin
Timo,
Can you show me some pictures?
Steven
Re: Run a procedure on button click
Posted: Sun Apr 22, 2018 7:24 am
by Timo
Screenshots:
btnrun.png
btnprop.png
PHP Procedure uses a form "Launch from" with Run (in a new window)
Re: Run a procedure on button click
Posted: Sun Apr 22, 2018 7:50 am
by admin
Timo,
It works for me.
procedure.PNG
What does your Procedure look like?
Steven
Re: Run a procedure on button click
Posted: Tue Apr 24, 2018 6:20 am
by Timo
For the time being, my procedure outputs just nuDebug('run php procedure');
I see that you tested with nublank. What if you select any other form, will it show up?
Re: Run a procedure on button click
Posted: Tue Apr 24, 2018 7:55 am
by admin
Timo,
Try it!
Steven
Re: Run a procedure on button click
Posted: Tue Apr 24, 2018 10:05 am
by Timo
admin wrote:Timo,
Try it!
Steven
That's what I've been trying;) If any other form is selected (run from in the PHP procedure), a blank page appears instead of the form.
The url that is opened looks like this:
https://xxxx/nurunphp.php?i=5adee4bab3fdbfd
Re: Run a procedure on button click
Posted: Wed Apr 25, 2018 10:26 am
by toms
Timo,
It isn't working for me either. You can try this workaround:
https://forums.nubuilder.cloud/viewtopic. ... 465#p16697
But it would be better if it there was a fix of course.