Accessing fields in alpaca forms from external source

561 views Asked by At

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 an example of how to do this, so 1) Is it possible? and 2) are there any examples floating around out there?

Thanks...

1

There are 1 answers

0
bcauchard On

I think you should be able to do that with $("#form").alpaca("get"), that will provide you the form, then ou can access your field in the object, with something like : field.getControlByPath. Once you got your field you can easily modify his .data or something like that, you maybe will have to .refresh() your field after that.

Documentation : - getControlByPath()