Modal component #1189
-
|
When using a modal component with a form where new data is entered, I'd like it to update on the page that owns the modal component after it's closed or saved. However, the problem is that when the form's submit button is clicked, the modal window remains open, since the same page opens after processing. The modal window can be closed separately, but that's unsightly. Is there a way to reopen the original page without the modal window open? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
|
It seems there is no way to solve this problem with pure SQLpage. You have to design a custom component and add few javascript snippets such as : in the custom component : and in the file : But as I do not master javascript, I did not succeed to make it works ! It should work but honestly I am stuck to how to use theses scripts ! All I achieved was to refresh the parent file when clicking on the "close" button. (When the form is submitted, it redirect a "form validated" confirm.sql message in the modal and then I close the modal by the button but it should close automatically after 2 sec) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks so much for the reply, I was really scratching my head trying to figure out how to get out of this situation. I wanted to use only SQLPage's capabilities, without the need for third-party tools. This means I'll have to rethink my approach to the current user profile editing form, where some data is master-details. I wanted to make some changes using a modal component. Essentially, I wanted to edit just a few fields, but not on the full page, which looks very sparse, in a small window. There are other options, but this approach is widely used in standalone applications, and habits are hard to change. |
Beta Was this translation helpful? Give feedback.
-
|
The same for me. I created a form with only the field to update (it is a timeline in a project management app and I want just to be able to update the starting date or duration of a task) access to my custom components (but read the disclaimer first !) |
Beta Was this translation helpful? Give feedback.
-
|
I am not sure I understand the problem. Can you share a minimal example? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


It seems there is no way to solve this problem with pure SQLpage.
You have to design a custom component and add few javascript snippets such as :
in the custom component :