[Silk UI] Modal Popup :- keep the modal popup open on button click

[Silk UI] Modal Popup :- keep the modal popup open on button click

Hi all,

I am using Slik UI's Modal popup.
I want to keep the popup open on button click action if any field is missing to show the Error message to the user.But the popup is getting closed.
Is there any way to keep the popup open ?

Hello Sunny,

Sorry for the late reply, but we missed your post. For future posts, please use the Silk UI Forums.

From your description, I suspect that you may be using buttons with Submit. When you click a button with a submit, the modal is closed. 
However, if instead of a submit you use a Ajax Submit, you will only close the modal if you use the toogleModal action inside the button action.

Please let me know if you have questions.

Samuel Jesus
Hi @Samuel
Thanks for the Reply. But i need button with Submit only. 
I am consuming the Rest API with PUT method to save the data on Save button (with submit).
I am uisng submit because After i save data gaing i have to Call the Rest API to get the updatd response.

Can you tell me how to refresh the data using REST API with ajax Submit
HI Samule

If i have to refresh a Aggregate or SQL Query we use "Refresh Data" control.
How can i refresh the API response on Ajax submit
Hello Sunny,
Looking at your posts, I can see that this is actually a really specific problem.
I'm going to give you one possible solution for your question, and although this is a bit technical and long, I'll do it step by step, so please bear with me.
1 -  I created a new application, where I'm consuming a REST Webservice, with 2 methods: GetPeopleLList and PutAddNewPeople

2 - My application will have a homepage that will list all the people on my database, and will contain a modal to add new people. All the information will be saved and retrieved via my REST webservice.

As you can see on the previous image, I added 2 local variables to the page: PeopleList and People. My PeopleTableRecord is using the PeopleList variable instead of the output from the REST service.

3 - On my page Preparation I'm calling the GetPeopleList method from the REST service, and I'm using that output to feed the PeopleList variable. By doing this, my table will have values returned from the webservice.

4 - On my "OpenModal" action (action that will be called by the "Add New People" button), I', clearing the local variable People and I' refreshing the PeopleForm to make sure I'm creating a new record. After that, I open the modal using the toggleModal action.

5 - Finally, on my SaveAndCloseModal action, I start by saving the new record I just created, using the webservice. After that I'm closing the modal, but this step is optional.
So, now that I already saved the new information via the REST service, I just need to retrieve that information again. Since I used a local variable to store the OutputList from the REST, now I just need to get the same list again and refresh the variable values.
So, I star by clearing the List. Then, I get the new information from the webservice, assign the REST output to my PeopleList variable again and Ajax refresh the PeopleTable to make sure my new information is correctly displayed.
Let me know if this makes sense to you, or if we can help you out in any other way.
Samuel Jesus

Thanks Samuel , This is the Great Help