Reloading select post submit?

Reloading select post submit?

panzrampanzram Posts: 29Questions: 11Answers: 0
edited April 2016 in Editor

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

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    Answer ✓

    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 the update() method of the select field type.

    Allan

  • panzrampanzram Posts: 29Questions: 11Answers: 0

    Thank you Allan. I think that solved it.

This discussion has been closed.