bootpopup
bootpopup copied to clipboard
Save as array different input types
Hi, I'm trying to save as array: Single input and select html type, but get Array data in DB:
bootpopup.prompt([{type: "text", label: "Title", name: "title", placeholder: "Write description"},{label: "Select site", type: "select", name: "select", options: { a:"A", b:"B", c:"C" }}] ,function(data){ var str = data;
You will have to extract the data , it's a dictionary. Something like :
function(data) { for(var key in data){ fabricList = data[key]; } }
Be careful with any value after spaces are ignored, so replace them with underscore.