Closed roypardi closed 6 years ago
You can find the template for a form element here:
https://github.com/gitana/alpaca/blob/master/src/templates/web-edit/control.html
In your case, the property path is: /path/projectPath
Copy the template from above and paste it into your options as follows:
{
...
"options": {
"view": {
"fields": {
"/path/project/path": {
"templates": {
"control": `INSERT TEMPLATE HERE`
}
}
}
}
}
...
}
Please note the quotation marks. Now you can insert the button into the template, but you are on your own when it comes to event handling...
Thanks! That helped a lot
(this isn't really an "issue" but I've exhausted all other resources)
I need to be able to add buttons within a form ( for
Electron
desktop app: buttons to select files, pick directories, etc.). I've dug through all the documentation and searched through all the past issues, where I've seen similar needs posted but no real solutions.I've tried adding a
<button>
to a template and ended up with the result in the image below. That is not really a workable solution. I've seen some references in the "issues" about a "button" field type but I have not been able to get that to work.I've posted project code and details over on stackoverflow but
Alpacajs
doesn't seem a very active topic there. Does anyone have any suggestions or can give me a gentle shove in the ("a") right direction? I'm no Javascript/HTML hero but I can usually sort things out but this has me stumped.