Skip to content

Commit

Permalink
remove reference to EJS
Browse files Browse the repository at this point in the history
  • Loading branch information
aeberhart committed Oct 21, 2024
1 parent ebf4144 commit 2b3d576
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions dashjoin-docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

* **I have an object with special characters in the field names (e.g. a SQL query result). How can I access this field in JSONata?** In [JSONata](https://docs.jsonata.org/simple#navigating-json-objects), field names can be escaped using back-ticks (`). Click [here](https://demo.my.dashjoin.com/#/page/html) for a live example.

* **I have an object with special characters in the field names (e.g. a SQL query result). How can I access this field in the HTML widget?** The HTML widget uses [EJS](https://ejs.co/), which allows embedding JavaScript templates in HTML. In Javascript, you can access non-alphanummeric field names as follows: `object["field.name"]`. Click [here](https://demo.my.dashjoin.com/#/page/html) for a live example.

* **How can I customize the forms in the edit, button and variable widgets?** The layout editor allows you to graphically edit the "input" widgets' settings. Note that not all features of the component are exposed in the WYSIWYG editor. You can leverage the advanced features by editing the underlying JSON directly in Dashjoin Studio. This [online playground](https://dashjoin.github.io/) lets you experiment with the various features. The demo application shows two examples. The "createSchema" of the [customer page](https://github.com/dashjoin/dashjoin-demo/blob/main/model/dj-database/dj%252Fnorthwind.json) section shows the form of the email button, which displays the email body input field with a larger text box. The city instance page shows a similar layout for the edit widget. The [variable example](https://github.com/dashjoin/dashjoin-demo/blob/main/model/page/variable.json) shows how a select widget with display names and values can be rendered.

* **How can I use values from the database in the edit, button and variable widgets?** This can be achieved by combining the JSON Schema Form extension mechanism described in the section above with the [API](api.md). In the example below, all values from the table test in the DB sql are retrieved. The jsonata expression projects the column id to be used as the auto-complete choices in the input field.
Expand Down

0 comments on commit 2b3d576

Please sign in to comment.