You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Active Admin plugin to add dynamic behaviors to fields.
3
+
An Active Admin plugin to add dynamic behaviors to some fields.
4
4
5
5
Features:
6
6
- set conditional checks on fields
7
-
- trigger some actions on other fields
7
+
- trigger actions on target elements
8
8
- inline field editing
9
9
- create links to load some content in a dialog
10
10
@@ -14,7 +14,10 @@ The easiest way to show how this plugin works is looking the examples [below](#e
14
14
- Add to your Gemfile: `gem 'activeadmin_dynamic_fields'`
15
15
- Execute bundle
16
16
- Add at the end of your ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):
17
-
`//= require activeadmin/dynamic_fields`
17
+
18
+
```js
19
+
//= require activeadmin/dynamic_fields
20
+
```
18
21
19
22
## Options
20
23
Options are passed to fields using *input_html* parameter as *data* attributes:
@@ -38,6 +41,8 @@ Options are passed to fields using *input_html* parameter as *data* attributes:
38
41
-**data-function**: check the return value of a custom function
39
42
-**data-arg**: argument passed to the custom set function (as array of strings)
40
43
44
+
A check condition or a custom check function are required. A trigger action is required too, unless you are using a custom function (in that case it is optional).
0 commit comments