Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Run a procedure on button click

Questions related to using nuBuilder Forte.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Run a procedure on button click

Unread post 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.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Run a procedure on button click

Unread post 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
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Run a procedure on button click

Unread post 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.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Run a procedure on button click

Unread post by admin »

Timo,

Can you show me some pictures?

Steven
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Run a procedure on button click

Unread post by Timo »

Screenshots:
btnrun.png
btnprop.png
PHP Procedure uses a form "Launch from" with Run (in a new window)
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Run a procedure on button click

Unread post by admin »

Timo,

It works for me.
procedure.PNG
What does your Procedure look like?

Steven
You do not have the required permissions to view the files attached to this post.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Run a procedure on button click

Unread post 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?
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Run a procedure on button click

Unread post by admin »

Timo,

Try it!

Steven
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Run a procedure on button click

Unread post 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
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Run a procedure on button click

Unread post 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.
Locked