Reloading select post submit?
Reloading select post submit?
Hi,
I have a table of objects, that can contain objects...like a bag of bags. If I have "bagA" and "bagB" already created and I create a new one ("bagC"), I want the select to display all 3 bags the next time I create a new bag. The select is created via a custom function:
{
label: "Bags:",
name: "bag",
id: "bagId",
type: "select",
ipOpts: bagLoader(),
"attr": {"class": "form-control"}
}
Is there a way to call the bagLoader postSubmit? ..or to reload the select postSubmit?
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
Answers
Do you mean you want to update the options dynamically? If so, you can either have the server return the
options
object in the JSON after the end, which works the same way at that point as when the data is initially loaded, or you can use theupdate()
method of theselect
field type.Allan
Thank you Allan. I think that solved it.