Force Editor to update database before close
Force Editor to update database before close
menashe
Posts: 196Questions: 43Answers: 2
How do I force the Editor to update the database before pressing "Create" to close?
In the example shown, the Price information (specifically, a "price_id") must exist before the user attempts to add a new discount on the Discount tab.
Answers
When you press the "Create" button it will submit the data to the server, which will then process it, return information to the client-side, update the host DataTable and then finally hide the Editor form. It is done that way to allow for any validation errors returned by the server to be shown in the form.
It sounds like you need to add some validation to your server-side script to check for a price id. What are you using on the server-side here?
Regards,
Allan
I'm beginning to think that I just need to remove the Discount tab/pill and have the discount information as children under the Price. That way, a price is always guaranteed to exist!
Sometimes, we can get too "fancy."
(That would be four levels of child tables!)