-
Notifications
You must be signed in to change notification settings - Fork 96
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
How to pass a parameter to child nested form? #127
Comments
Hi, I'm sorry, i'm not sure I understand what the issue is. If you're trying to set a maximum amount based on the given currency then I don't think the problem is related to this package, can you give me an example? |
I think you could use a custom validation rule, attached to nested form |
On the image above you can see that i chose ''EUR" as my currency. |
Request::input("currency") ? |
@alberto-bottarini can you please elaborate? |
I think I was drunk. I do not remember what I intended |
I have the same issue: I want to pass data to the nested form. Is there a way to do that? It basically requires JS to do it. right? |
Passing a parameter to nasted form:
My basic form has a select input with 2 options, depends on a chosen option i should use different riles in my nestedDFrm...so is it possible to get that select value and pass it ti my form?
There is the place i am adding the form:
NestedForm::make('DebtAllocations')->open(true)->min(1),
HasMany::make('DebtAllocations'),
Here also i have currency option select added.
There is inside DebtAllocations form:
Number::make('Amount', 'amount')->onlyOnForms()->rules('required')
And i need to set maximum posiible amount depends on currency - so for example, if currency is 'euro' the limit is 1000, but if currency is 'usd', the limit is 800
The text was updated successfully, but these errors were encountered: