After submission JavaScript in page builder form component

I think a nice addition to the builder is a tab in the form editor where you can add some JavaScript that will be triggered when a form is submitted.

There you could add a re-rendering of components on the same page of the form.

Another possibility is that you would add this possibility in the rules section at the submit rules of the form component.

Example:

In an hour registration app, you could add time registrations to a list on the same page and below a summation of the total time spend on the project, which should change with every time registration.
With this proposal, you could ask for a re-rendering of the summation component after form submit.

Sorry if I misunderstood, but the add new button already opens a form and on submition it takes you back to the list with the updated totals…?

This is a general thing. I gave an example how you could use this for better understanding.

@Peter Do you mean like this? When submitted the totals auto update. Records in the screenshot below shows total of 22 hours of time booked against a project called ‘Site B’

No I don’t mean that, my proposal is different. It was a general requirement, there is so much more you can do with that feature, not only summation - you could run a pop-up, play a sound, link to another page, ask for page reload, or for only some or one component.

It is a low-code feature, but a feature which is triggered after form submission.

Following case: suppose you turn my example around. I want to show the amount of hours which is missing from the project expected time.
I show beside the total also the expected time minus total. To make it more clearer for everyone, I would put this total missing hours in a custom component. I would like this custom component to update once a new time entry has been done.
Example in development with me:


1 are the totals - you see it has not been updated
2 is an action button, when you push this the total is not updated. It would be nice if you could trigger a TB.render action with the submission.

I am sure there is a way to do that with JavaScript, but this is nocode, so we want it to make easy for everyone to use this.

This feature is offered by several other platforms.

I thought of another solution that might be easier to accomplish:

Add a updateComponent to the Tadabase JavaScript callback functions and actions.

the existing ones being:

Callbacks

  • TB.render
  • before-page-change

Actions:

  • TB.showLoading()
  • TB.hideLoading()
  • TB.showComponent
  • TB.hideComponent
  • TB.navigateToPageId // pageId
  • TB.navigateTo //page slug
  • TB.showAlert
  • TB.getUserToken

Is this possible @moe