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

Support dot syntax in form field names #9163

Closed
sminnee opened this issue Aug 2, 2019 · 1 comment · Fixed by #9192
Closed

Support dot syntax in form field names #9163

sminnee opened this issue Aug 2, 2019 · 1 comment · Fixed by #9192

Comments

@sminnee
Copy link
Member

sminnee commented Aug 2, 2019

It would be great if saveInto() and loadDataFrom() supported the dot syntax for traversing has-one relations. If you had Book has_one Author, it would let you set up forms such as this:

new FieldList(
  new TextField('Title', 'Book title'),
  new TextField('Author.FirstName', 'Author firstname'),
  new TextField('Author.Surname', 'Author surname'),
);
@sminnee
Copy link
Member Author

sminnee commented Aug 2, 2019

#9162 relates to this, in that they're both very helpful for building better ModelAdmins around many-many-through datasets. The boilerplate listed in that ticket is the workaround that you need because this feature isn't available.

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

Successfully merging a pull request may close this issue.

1 participant