0
votes

I'm trying to modify Dockyard's ember-easyForm so the model path is saved in the form view rather than the template so you can have multiple forms in a template. I can get the child views to access the parent view but the input-field helper sets up the model path for it's associated view and I'm wondering how can I get access to the parent view from the helper.

form-for helper -> Form view (have set formForModelPath property on this view)
  input helper -> Input view
    input-field helper -> TextField, TextArea, Checkbox etc. view

The model path is setup in input-field helper, how can I get access to Form.formForModelPath from there?

1

1 Answers

0
votes

Looking at this post, this seems to be the way to access the parent view within a helper:

options.data.view.get('parentView');

Though in the end I only need to access the view. Here are my changes to get ember-easyForms to handle multiple forms on a template.