Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for custom forms: pass all formData down to nested form groups #21

Closed
dantevvp opened this issue Jun 29, 2021 · 1 comment
Closed

Comments

@dantevvp
Copy link
Contributor

Currently, I have a form that uses many groups with query select fields. One difficulty I have come across is trying to access a variable that is present in the root of the form, from inside of a group item, like in this form:

image

The field Categoría de producto has a key called product_category_id, and in my Specs group, the Spec field is controlled by a query, which has a product_category_id variable. The problem is that because the Spec field is inside a group, it cannot see the product_category_id variable, so the query select in Spec always thinks that there is no product category.

Could it be possible for all nested fields to see variables that are further up in the form? Maybe if there is a field inside the group that has the same name as a variable in the root of the form, it can override its value for that group

@omohokcoj
Copy link
Member

thanks @dantevvp, it has been implemented in the newest version:
https://rubygems.org/gems/motor-admin/versions/0.1.75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants