Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Save the time of pressing the button on the form.
-
- Posts: 377
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Save the time of pressing the button on the form.
Calling onclick on button 3 procedures:
1.nuRunPhpHide ('CCC'); - makes calculations and writes data to the database table.
2. nuGetBreadcrumb (); -to update the main form.
3. GetCurrentime () function for setting the time on the main form element.
I observe during PHP execution how point 3 worked and the time on the element appeared, but after point 2 it disappears.
Of course, you can save this value in my database, but I hope that nuBuilder has a callable function to save the entire form on event.
1.nuRunPhpHide ('CCC'); - makes calculations and writes data to the database table.
2. nuGetBreadcrumb (); -to update the main form.
3. GetCurrentime () function for setting the time on the main form element.
I observe during PHP execution how point 3 worked and the time on the element appeared, but after point 2 it disappears.
Of course, you can save this value in my database, but I hope that nuBuilder has a callable function to save the entire form on event.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Save the time of pressing the button on the form.
HI,
Are you using nuJavascriptCallback? This is used to runs code after nuRunPHPHidden() has returned from the server.
https://wiki.nubuilder.cloud/ ... nPHPHidden
Are you using nuJavascriptCallback? This is used to runs code after nuRunPHPHidden() has returned from the server.
https://wiki.nubuilder.cloud/ ... nPHPHidden
-
- Posts: 377
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Save the time of pressing the button on the form.
I think nuJavascriptCallback won't help in this situation because I need to update the form to read data from the database. I need to save a form with the currentTime received before a PHP function. I need to programmatically click on the 'Save' button.kev1n wrote:HI,
Are you using nuJavascriptCallback? This is used to runs code after nuRunPHPHidden() has returned from the server.
https://wiki.nubuilder.cloud/ ... nPHPHidden
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Save the time of pressing the button on the form.
If nuRunPhpHidden ('CCC') write data to the DB, can't you write the current time as well?
Or maybe I just don't understand exactly what you want to do.
Or maybe I just don't understand exactly what you want to do.
-
- Posts: 377
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Save the time of pressing the button on the form.
Quite lengthy nuRunPhpHidden ('CCC') writes many rows to its table and subform - there will be many unnecessary currentTime values, but I only want to record the time when the button was clicked in a separate element of the main form.kev1n wrote:If nuRunPhpHidden ('CCC') write data to the DB, can't you write the current time as well?
Or maybe I just don't understand exactly what you want to do.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Save the time of pressing the button on the form.
Call another procedure with nuRunPHPHidden() that sets the timestamp?
-
- Posts: 377
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Save the time of pressing the button on the form.
It all comes down to nuGetBreadcrumb () -kev1n wrote:Call another procedure with nuRunPHPHidden() that sets the timestamp?
I pressed the button - I got the time.
Called PHP and nuGetBreadcrumb () zeroes it out.
I need to programmatically save the main form before calling PHP.
Or update only the subform without updating the main one.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Save the time of pressing the button on the form.
kknm wrote:kev1n wrote: I need to programmatically save the main form
Code: Select all
nuSaveAction()
-
- Posts: 377
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Save the time of pressing the button on the form.
NuSaveAction does not work for me on onclick eventkev1n wrote:kknm wrote:kev1n wrote: I need to programmatically save the main formCode: Select all
nuSaveAction()
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Save the time of pressing the button on the form.
nuSaveAction(); will save the current record. It is also called when you click the (red) Save Button.
What do you mean "it doesn't work"?
What do you mean "it doesn't work"?