Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save as array different input types #5

Open
c3media opened this issue Oct 14, 2018 · 1 comment
Open

Save as array different input types #5

c3media opened this issue Oct 14, 2018 · 1 comment

Comments

@c3media
Copy link

c3media commented Oct 14, 2018

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;

@sindhujit
Copy link

sindhujit commented Jan 7, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants