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

File Browse button doesn't appear for File field in an array item #7

Closed
lchin opened this issue Dec 14, 2012 · 1 comment
Closed

File Browse button doesn't appear for File field in an array item #7

lchin opened this issue Dec 14, 2012 · 1 comment

Comments

@lchin
Copy link

lchin commented Dec 14, 2012

Hi,

The file browse button doesn't seem to appear for a File Field when it's placed in an array.

Below is a quick test that I have modified for one of the Array Field Component Examples.

Can you please help investigate?

Thanks
livern

$(function() {
$("#field5").alpaca({
"schema": {
"description": "My Favorite Ice Creams",
"type": "array",
"items": {
"title": "Ice Cream",
"type": "object",
"properties": {
"flavor": {
"title": "Flavor",
"description": "Ice cream flavor",
"type": "string"
},
"topping": {
"title": "Topping",
"description": "Ice cream topping",
"type": "string"
},
"image": {
"title": "Image",
"description": "Ice cream topping image",
"type": "string",
"format": "uri"
}
}
}
}
});
});

@drq
Copy link
Contributor

drq commented Dec 18, 2012

Give the following code a try. Basically you need to set the image field type in options. Other wise it will just render a text field that support url type value.

$(function() {
$("#field5").alpaca({
"schema": {
"description": "My Favorite Ice Creams",
"type": "array",
"items": {
"title": "Ice Cream",
"type": "object",
"properties": {
"flavor": {
"title": "Flavor",
"description": "Ice cream flavor",
"type": "string"
},
"topping": {
"title": "Topping",
"description": "Ice cream topping",
"type": "string"
},
"image": {
"title": "Image",
"description": "Ice cream topping image",
"type": "string",
"format": "uri"
}
}
}
},
"options" : {
"fields": {
"item": {
"fields": {
"image" : {
"type" : "file"
}
}
}
}
}
});
});

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