Questions tagged [alpacajs]

Alpaca allows you to generate interactive HTML5 forms based for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.

104 questions
14
votes
3 answers

How to make key value like enum in java

I need to make an Enum containing some strings with spaces and their values in int like: public enum status{ Active(1), Inactive(2); } because I am using it with hibernate and also will convert it to JSON for alpaca js forms. like: [{"text":…
Saqib Ahmed
  • 1,240
  • 1
  • 15
  • 25
6
votes
1 answer

How to create a required conditional field using Alpaca?

Does anyone know how I can define a required field which is dependant on another field? For example if field1 is marked true then field2 must be required, otherwise field 2 should not be filled. Here is my current attempt: "field1": { "title":…
Miguel Camargo
  • 103
  • 1
  • 8
5
votes
1 answer

Alpaca Forms validation show error message only after user leaves field (leaves the field)

All the fields marked required are in red when the form loads since they are blank. How do I change this so that they only turn red (check validation) if/when someone leaves a particular field. This is specific to Alpaca forms. …
Saurabh Maurya
  • 870
  • 7
  • 12
5
votes
1 answer

alpaca javascript dom update

I create my alpaca form with the following syntax: function createNewAlpacaForm(data, schema, formId, saveButtonId, clickEventFunc) { $(formId).empty(); $(saveButtonId).off('click'); alpacaForm = $(formId).alpaca({ "data" :…
Michael LoCicero
  • 423
  • 1
  • 5
  • 11
3
votes
2 answers

Alpaca - Replace '★' with '*' on required field

Is there a way to replace the Star symbol with an asterisk on a 'required' field label on Alpaca? Here is the schema: var Schema = { "title": "Lista controlli", "type": "array", "items": { "type": "object", "title":…
Dr. Roggia
  • 1,095
  • 3
  • 16
  • 40
3
votes
1 answer

Accessing fields in alpaca forms from external source

I am trying to integrate an HTML page, built using alpaca forms, with an external python server. Ideally, I'd use websockets to pass a key and value, which would then populate the corresponding field in the alpaca form. I've not been able to find…
Dave Reid
  • 175
  • 1
  • 2
  • 5
3
votes
2 answers

Autocomplete displays key and value using Alpaca forms

I'm using Alpaca forms to generate a form and one field will have an autocomplete. I'm testing Example 7 from http://www.alpacajs.org/docs/fields/text.html to see how this works. However, in my form the autocomplete displays as {"value":"Cloud CMS"}…
tw1742
  • 1,424
  • 4
  • 18
  • 37
2
votes
0 answers

How to obtain split and dividend adjusted prices using alpaca_trade_api?

I am modeling the minute prices of stocks and I obtain the data using the alpaca_trade_api from Python: api = tradeapi.REST(api_key, secret_key, 'https://paper-api.alpaca.markets') data = api.get_barset('AAPL', 'minute', end=datetime.datetime(2020,…
Caprikuarius2
  • 137
  • 1
  • 7
2
votes
2 answers

Importing alpaca into React.js

I am trying to use an Alpaca form within a React app: import React, { useEffect, useRef } from "react"; import $ from "jquery"; import * as popper from "popper.js"; import * as bootstrap from "bootstrap"; import * as handlebars from…
Albert Gevorgyan
  • 171
  • 3
  • 10
2
votes
2 answers

Datetime field does not work in Alpaca.js

I have these scripts on my html page: