Closed tomsowerby closed 8 years ago
@tomsowerby I think I have had the same issue myself, this is something worth looking at as we move forward and in the planning gitter but for now I have solved this by adding additional form keys that aren't in my model and updating those in a decorator I use just for additional info/hints which evaluates on the top level scope and watches for changes.
It is hacky but it worked for me.
But re-reading your question in the example you could re-use the schema for each but have a different title in the form for each, I do that a lot too.
@tomsowerby not sure why the documentation changed, but take a look at this older version of it for what is on the scope https://github.com/json-schema-form/angular-schema-form/blob/1345067fdfabf23507db16542465572b1509f4d8/docs/extending.md
I suspect evalExpr is what you are after, sorry I didn't know it was removed i will check why, but I think it is still available.
Please re-open if you do not feel the question has been answered sufficiently.
For me this is not clearly answered. I want to a create a custom date input out of 3 different inputs. If any of these inputs change i try to set the value to the original (hidden) date input.
I just need to add a custom function for ng-change on the 3 inputs to update the date input. I have not found any solution yet and the above explanations are not really helpful for me.
Could anybody give me a hint how to achieve this?
Ended up with adding the function to the item (form).
One problem is left. The valid state is rendered correct. The invalid state is just black instead of red.
Any idea what i am missing?
@BioPhoton your issue is not related to the current issue directly I suggest making a new issue to work through your problem specifically. Include a gist to help with examining the issue also please.
Hello, I'm seeking clarity please.
So we extend schema-form in a simple way:
Then we have our newfield.html template:
So, question: Is there a way to inject or have the template inherit our customScopeVariable without us referencing it using x amount of $parent. references to get to it?
Consider fields "Billing address line one" and "Shipping address line one", using the same schema containing "title":"address line one" and a Billing/Shipping prefix variable being passed from the scope. This is a basic example that probably doesn't require custom fields, but hopefully it gives you an idea of what I'm trying to achieve.